mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
changed function XXX( to function XXX (
This commit is contained in:
parent
7e5eeb0a27
commit
76daceb2e7
22 changed files with 22 additions and 22 deletions
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Channel, CoordinatorLink) {
|
function (Channel, CoordinatorLink) {
|
||||||
|
|
||||||
function ChannelBootstrap(process) {
|
function ChannelBootstrap (process) {
|
||||||
|
|
||||||
var coordinatorLink = new CoordinatorLink(process);
|
var coordinatorLink = new CoordinatorLink(process);
|
||||||
var channel = null;
|
var channel = null;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Networker, SocketIO) {
|
function (Networker, SocketIO) {
|
||||||
|
|
||||||
function Client(location, options) {
|
function Client (location, options) {
|
||||||
this.socket = SocketIO.connect(location, options);
|
this.socket = SocketIO.connect(location, options);
|
||||||
this.networker = new Networker(this.socket);
|
this.networker = new Networker(this.socket);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (http, nodeStatic) {
|
function (http, nodeStatic) {
|
||||||
|
|
||||||
function HttpServer(options) {
|
function HttpServer (options) {
|
||||||
options.port = options.port || 1234;
|
options.port = options.port || 1234;
|
||||||
options.caching = typeof options.caching != 'undefined' ? options.caching : true;
|
options.caching = typeof options.caching != 'undefined' ? options.caching : true;
|
||||||
options.rootDirectory = options.rootDirectory || './';
|
options.rootDirectory = options.rootDirectory || './';
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ define([
|
||||||
|
|
||||||
function (HttpServer, Socket, Coordinator) {
|
function (HttpServer, Socket, Coordinator) {
|
||||||
|
|
||||||
function Server(options) {
|
function Server (options) {
|
||||||
coordinator = new Coordinator();
|
coordinator = new Coordinator();
|
||||||
httpServer = new HttpServer(options);
|
httpServer = new HttpServer(options);
|
||||||
this.socket = new Socket(httpServer.getServer(), options, coordinator);
|
this.socket = new Socket(httpServer.getServer(), options, coordinator);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ define([
|
||||||
|
|
||||||
function (io) {
|
function (io) {
|
||||||
|
|
||||||
function Socket(server, options, coordinator) {
|
function Socket (server, options, coordinator) {
|
||||||
options.logLevel = typeof options.logLevel != 'undefined'
|
options.logLevel = typeof options.logLevel != 'undefined'
|
||||||
? options.logLevel
|
? options.logLevel
|
||||||
: 0;
|
: 0;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Box2D, Parent) {
|
function (Box2D, Parent) {
|
||||||
|
|
||||||
function Detector(me) {
|
function Detector (me) {
|
||||||
Parent.call(this);
|
Parent.call(this);
|
||||||
this.me = me;
|
this.me = me;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
define(["Game/Core/Control/InputController", "Game/Client/Control/KeyboardInput"], function (InputController, KeyboardInput){
|
define(["Game/Core/Control/InputController", "Game/Client/Control/KeyboardInput"], function (InputController, KeyboardInput){
|
||||||
|
|
||||||
function KeyboardController(me, gameController) {
|
function KeyboardController (me, gameController) {
|
||||||
|
|
||||||
this.gameController = gameController;
|
this.gameController = gameController;
|
||||||
this.inputController = new InputController(me);
|
this.inputController = new InputController(me);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (ProtocolHelper, GameController) {
|
function (ProtocolHelper, GameController) {
|
||||||
|
|
||||||
function Networker(socketLink) {
|
function Networker (socketLink) {
|
||||||
this.socketLink = socketLink;
|
this.socketLink = socketLink;
|
||||||
this.gameController = null;
|
this.gameController = null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
define(['Lib/Vendor/Three', 'Game/Config/Settings'], function (Three, Settings) {
|
define(['Lib/Vendor/Three', 'Game/Config/Settings'], function (Three, Settings) {
|
||||||
|
|
||||||
function CameraController(isOrthographic) {
|
function CameraController (isOrthographic) {
|
||||||
|
|
||||||
isOrthographic = typeof isOrthographic == 'undefined'
|
isOrthographic = typeof isOrthographic == 'undefined'
|
||||||
? true
|
? true
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ var requires = [
|
||||||
|
|
||||||
define(requires, function (DomController, Three, Settings, CameraController){
|
define(requires, function (DomController, Three, Settings, CameraController){
|
||||||
|
|
||||||
function ViewController(){
|
function ViewController (){
|
||||||
|
|
||||||
this.mesh = null;
|
this.mesh = null;
|
||||||
this.scene = null;
|
this.scene = null;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Box2D, Parent) {
|
function (Box2D, Parent) {
|
||||||
|
|
||||||
function Detector() {
|
function Detector () {
|
||||||
this.listener = new Box2D.Dynamics.b2ContactListener();
|
this.listener = new Box2D.Dynamics.b2ContactListener();
|
||||||
this.listener.chuckDetector = this;
|
this.listener.chuckDetector = this;
|
||||||
this.listener.BeginContact = this.BeginContact;
|
this.listener.BeginContact = this.BeginContact;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
define(function (){
|
define(function (){
|
||||||
|
|
||||||
function InputController(player) {
|
function InputController (player) {
|
||||||
|
|
||||||
this.player = player;
|
this.player = player;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ define([
|
||||||
|
|
||||||
function (Engine, Level, Player) {
|
function (Engine, Level, Player) {
|
||||||
|
|
||||||
function GameController(physicsEngine) {
|
function GameController (physicsEngine) {
|
||||||
this.players = {};
|
this.players = {};
|
||||||
|
|
||||||
if (! physicsEngine instanceof Engine) {
|
if (! physicsEngine instanceof Engine) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
define(["Game/Config/Settings", "Lib/Vendor/Box2D", "Game/Core/Collision/Detector"], function (Settings, Box2D, CollisionDetector) {
|
define(["Game/Config/Settings", "Lib/Vendor/Box2D", "Game/Core/Collision/Detector"], function (Settings, Box2D, CollisionDetector) {
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
function Level(path, engine) {
|
function Level (path, engine) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.engine = engine;
|
this.engine = engine;
|
||||||
this.levelObject = null;
|
this.levelObject = null;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ define([
|
||||||
|
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
function NotificationCenter() {
|
function NotificationCenter () {
|
||||||
this.topics = {};
|
this.topics = {};
|
||||||
this.subUid = -1;
|
this.subUid = -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
define(function () {
|
define(function () {
|
||||||
|
|
||||||
function User(id) {
|
function User (id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
function (GameController, NotificationCenter) {
|
function (GameController, NotificationCenter) {
|
||||||
|
|
||||||
function Channel(coordinatorLink) {
|
function Channel (coordinatorLink) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.coordinatorLink = coordinatorLink;
|
this.coordinatorLink = coordinatorLink;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Box2D, Parent) {
|
function (Box2D, Parent) {
|
||||||
|
|
||||||
function Detector() {
|
function Detector () {
|
||||||
Parent.call(this);
|
Parent.call(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ define([
|
||||||
|
|
||||||
function () {
|
function () {
|
||||||
|
|
||||||
function CoordinatorLink(process) {
|
function CoordinatorLink (process) {
|
||||||
this.process = process;
|
this.process = process;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ define([
|
||||||
|
|
||||||
function (Parent, ProtocolHelper, NotificationCenter) {
|
function (Parent, ProtocolHelper, NotificationCenter) {
|
||||||
|
|
||||||
function User(id, coordinator) {
|
function User (id, coordinator) {
|
||||||
Parent.call(this, id);
|
Parent.call(this, id);
|
||||||
this.id = socketLink.id;
|
this.id = socketLink.id;
|
||||||
this.socketLink = socketLink;
|
this.socketLink = socketLink;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ function (User, Channel, childProcess) {
|
||||||
|
|
||||||
var fork = childProcess.fork;
|
var fork = childProcess.fork;
|
||||||
|
|
||||||
function Coordinator() {
|
function Coordinator () {
|
||||||
this.channels = {};
|
this.channels = {};
|
||||||
this.lobbyUsers = {};
|
this.lobbyUsers = {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ define([
|
||||||
|
|
||||||
function (Parent, ProtocolHelper) {
|
function (Parent, ProtocolHelper) {
|
||||||
|
|
||||||
function User(socketLink, coordinator) {
|
function User (socketLink, coordinator) {
|
||||||
Parent.call(this, socketLink.id);
|
Parent.call(this, socketLink.id);
|
||||||
|
|
||||||
this.coordinator = coordinator;
|
this.coordinator = coordinator;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue