use strict; fixes #83

This commit is contained in:
logsol 2014-12-22 01:43:21 +01:00
parent b886728bf5
commit 2b186be8af
78 changed files with 163 additions and 5 deletions

View file

@ -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;
}
}