mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
use strict; fixes #83
This commit is contained in:
parent
b886728bf5
commit
2b186be8af
78 changed files with 163 additions and 5 deletions
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Item, Box2D, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Doll(physicsEngine, uid, player) {
|
||||
Parent.call(this, physicsEngine, uid, player);
|
||||
|
|
@ -15,10 +17,12 @@ function (Parent, Item, Box2D, Nc) {
|
|||
|
||||
Doll.prototype.findCloseItem = function(x, y) {
|
||||
|
||||
var self = this;
|
||||
|
||||
function findItem(array) {
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var item = array[i];
|
||||
if(item.isGrabbingAllowed(this.player)) {
|
||||
if(item.isGrabbingAllowed(self.player)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue