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

@ -4,6 +4,8 @@ define([
function (Parent) {
"use strict";
function Detector () {
Parent.call(this);
}

View file

@ -14,6 +14,8 @@ define([
function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, Nc, Box2D, Player, GameObject, Doll, RagDoll) {
"use strict";
function GameController (options) {
this.animationTimeout = null;

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

View file

@ -3,6 +3,8 @@ define([
],
function (Parent) {
"use strict";
function Item(physicsEngine, uid, options) {
Parent.call(this, physicsEngine, uid, options);

View file

@ -5,6 +5,8 @@ define([
],
function (Parent, Settings, Nc) {
"use strict";
function RagDoll(physicsEngine, uid, options) {
this.scheduledForDestruction = false;

View file

@ -4,6 +4,8 @@ define([
function (Parent) {
"use strict";
return Parent;
});

View file

@ -4,6 +4,8 @@ define([
function (Parent) {
"use strict";
return Parent;
});

View file

@ -6,6 +6,8 @@ define([
function (Parent, Settings, FileSystem) {
"use strict";
function Level (uid, engine, gameObjects) {
Parent.call(this, uid, engine, gameObjects);
}

View file

@ -4,6 +4,8 @@ define([
function (Parent) {
"use strict";
return Parent;
});

View file

@ -5,6 +5,8 @@ define([
function (Nc, Channel) {
"use strict";
function PipeToServer (process) {
var self = this;

View file

@ -4,6 +4,8 @@ define([
],
function (Parent, Nc) {
"use strict";
function Player(id, physicsEngine, user) {
Parent.call(this, id, physicsEngine, user);