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 (Box2D) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Detector () {
|
||||
this.listener = new Box2D.Dynamics.b2ContactListener();
|
||||
this.listener.BeginContact = this.beginContact.bind(this);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
|
||||
function (PhysicsEngine, TiledLevel, Player, Nc, Doll) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function GameController (options) {
|
||||
|
||||
this.options = options;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ define([
|
|||
|
||||
function (Parent, Box2D, Settings, CollisionDetector, Item, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Doll (physicsEngine, uid, player) {
|
||||
|
||||
this.characterName = "Chuck";
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
],
|
||||
|
||||
function (Box2D, Exception) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function GameObject(physicsEngine, uid) {
|
||||
this.uid = uid;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D, Options, Settings, Exception, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Item(physicsEngine, uid, options) {
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function RagDoll(physicsEngine, uid, options) {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function RagDoll(physicsEngine, uid, options) {
|
||||
Parent.call(this, physicsEngine, uid, options);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
|
||||
function (Parent, RubeLoader, Box2D, Settings ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Fixme - make this loadable
|
||||
var __ragdollJson;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Skateboard(physicsEngine, uid, options) {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function SpectatorDoll(physicsEngine, uid, player) {
|
||||
Parent.call(this, physicsEngine, uid);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Box2D, Settings, Exception, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Tile(physicsEngine, uid, options) {
|
||||
this.options = options;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
|
||||
function (Settings, Box2D, CollisionDetector, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Engine () {
|
||||
this.world = new Box2D.Dynamics.b2World(
|
||||
new Box2D.Common.Math.b2Vec2(0, Settings.BOX2D_GRAVITY),
|
||||
|
|
|
|||
|
|
@ -7,9 +7,10 @@ define([
|
|||
"Game/" + GLOBALS.context + "/GameObjects/Items/RagDoll"
|
||||
],
|
||||
|
||||
|
||||
function (Doll, Settings, Nc, Exception, SpectatorDoll, RagDoll) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Player (id, physicsEngine, user) {
|
||||
this.stats = {
|
||||
health: 100,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue