mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
use strict; fixes #83
This commit is contained in:
parent
b886728bf5
commit
2b186be8af
78 changed files with 163 additions and 5 deletions
|
|
@ -2,6 +2,8 @@ define([
|
|||
],
|
||||
|
||||
function () {
|
||||
|
||||
"use strict";
|
||||
|
||||
function AudioPlayer(path) {
|
||||
this.audio = new Audio(path);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Detector () {
|
||||
Parent.call(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function GamepadInput(playerController) {
|
||||
this.playerController = playerController;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, DomController, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function MouseInput() {
|
||||
Parent.call(this);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ define([
|
|||
],
|
||||
|
||||
function (Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function XyInput() {
|
||||
this.x = null;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Key) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function KeyboardInput (playerController) {
|
||||
|
||||
this._registry = {};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
|
||||
function (Parent, KeyboardInput, MouseInput, Nc, GamepadInput) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function PlayerController (me) {
|
||||
|
||||
Parent.call(this, me);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ define([
|
|||
|
||||
function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Nc, requestAnimFrame, Settings, GameObject, Doll, DomController, ProtocolHelper, Me, AudioPlayer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc, Exception, ColorConverter, Layer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Doll(physicsEngine, uid, player) {
|
||||
this.layerId = Layer.ID.SPAWN;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Exception, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function GameObject(physicsEngine, uid) {
|
||||
Parent.call(this, physicsEngine, uid);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc, Layer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Item(physicsEngine, uid, options) {
|
||||
this.layerId = Layer.ID.ITEM;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, CoreItem, Settings, Nc, Layer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function RagDoll(physicsEngine, uid, options) {
|
||||
this.layerId = Layer.ID.SPAWN;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Rube(physicsEngine, uid, options) {
|
||||
Parent.call(this, physicsEngine, uid, options);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function SpectatorDoll(physicsEngine, uid) {
|
||||
Parent.call(this, physicsEngine, uid);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc, Layer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Tile(physicsEngine, uid, options) {
|
||||
this.layerId = Layer.ID.TILE;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
|
||||
function (Parent, Settings, Nc, PIXI, AbstractLayer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Level (uid, engine, gameObjects) {
|
||||
Parent.call(this, uid, engine, gameObjects);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function TiledLevel(uid, engine, gameObjects) {
|
||||
this.layerId = "background";
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Settings, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Me(id, physicsEngine, user) {
|
||||
Parent.call(this, id, physicsEngine, user);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ define([
|
|||
|
||||
function (ProtocolHelper, GameController, User, Nc, Settings, DomController) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Networker (socketLink, channelName, nickname) {
|
||||
this.channelName = channelName;
|
||||
this.nickname = nickname;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
|
||||
function (Parent, Settings, DomController, Box2D, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Engine () {
|
||||
Parent.call(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, Nc, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Player(id, physicsEngine, user) {
|
||||
Parent.call(this, id, physicsEngine, user);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (Abstract) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Layer(name, parallaxSpeed) {
|
||||
this.name = name;
|
||||
this.parallaxSpeed = parallaxSpeed;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
],
|
||||
|
||||
function (Abstract, DomController, Settings, Exception, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function AbstractView () {
|
||||
this.me = null;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
|
||||
function (Settings, Nc, Stats, Screenfull) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function DomController() {
|
||||
this.canvas = document.getElementById("canvas");
|
||||
this.debugCanvas = null;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ define([
|
|||
],
|
||||
|
||||
function (Nc, Exception, Layer) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function LayerManager(container, me) {
|
||||
this.layers = [];
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
|
||||
function (Settings, Nc, Stats, Screenfull) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Mesh() {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ define([
|
|||
|
||||
function (PIXI) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var Parent = PIXI.AbstractFilter;
|
||||
|
||||
function ColorRangeReplaceFilter() {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (PIXI, Nc, Settings, ColorConverter) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function GameStats(container) {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ define([
|
|||
|
||||
function (Parent, PIXI, ColorRangeReplaceFilter, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var AVAILABLE_MESH_FILTERS = {
|
||||
"blur": PIXI.BlurFilter,
|
||||
"desaturate": PIXI.GrayFilter,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, PIXI, Nc, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function Ghost() {
|
||||
Parent.call(this, "ghost", 0);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ define([
|
|||
|
||||
function (Parent, DomController, PIXI, Settings, Nc, Exception, GameStats, LayerManager, Ghost) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function PixiView () {
|
||||
|
||||
Parent.call(this);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ define([
|
|||
],
|
||||
|
||||
function (Parent, DomController, Three, Settings) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function ThreeView () {
|
||||
Parent.call(this);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ define([
|
|||
],
|
||||
|
||||
function (Settings, Exception, AbstractView, PixiView, Nc) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var ViewManager = {};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue