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
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Detector () {
|
||||
Parent.call(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Item(physicsEngine, uid, options) {
|
||||
Parent.call(this, physicsEngine, uid, options);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function RagDoll(physicsEngine, uid, options) {
|
||||
this.scheduledForDestruction = false;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
return Parent;
|
||||
|
||||
});
|
||||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
return Parent;
|
||||
|
||||
});
|
||||
|
|
@ -6,6 +6,8 @@ define([
|
|||
|
||||
function (Parent, Settings, FileSystem) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Level (uid, engine, gameObjects) {
|
||||
Parent.call(this, uid, engine, gameObjects);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
return Parent;
|
||||
|
||||
});
|
||||
|
|
@ -5,6 +5,8 @@ define([
|
|||
|
||||
function (Nc, Channel) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function PipeToServer (process) {
|
||||
|
||||
var self = this;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Player(id, physicsEngine, user) {
|
||||
Parent.call(this, id, physicsEngine, user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue