mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
refactored Server and Lobby
This commit is contained in:
parent
42475c9b38
commit
d83376d5c7
26 changed files with 29 additions and 29 deletions
|
|
@ -1,7 +1,7 @@
|
|||
define([
|
||||
"Game/Server/GameController",
|
||||
"Game/Channel/GameController",
|
||||
"Lib/Utilities/NotificationCenter",
|
||||
"Game/Server/User",
|
||||
"Game/Channel/User",
|
||||
"Lib/Utilities/Protocol/Helper",
|
||||
"Lib/Utilities/Options",
|
||||
"Game/Config/Settings"
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
function (GameController, Nc, User, ProtocolHelper, Options, Settings) {
|
||||
|
||||
function Channel (pipeToLobby, name, options) {
|
||||
function Channel (pipeToServer, name, options) {
|
||||
|
||||
var self = this;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
this.name = name;
|
||||
this.users = {};
|
||||
|
||||
this.pipeToLobby = pipeToLobby;
|
||||
this.pipeToServer = pipeToServer;
|
||||
|
||||
this.gameController = new GameController(this);
|
||||
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
define([
|
||||
"Game/Core/GameController",
|
||||
"Game/Server/Physics/Engine",
|
||||
"Game/Channel/Physics/Engine",
|
||||
"Game/Config/Settings",
|
||||
"Game/Server/Control/PlayerController",
|
||||
"Game/Channel/Control/PlayerController",
|
||||
"Lib/Utilities/RequestAnimFrame",
|
||||
"Lib/Utilities/NotificationCenter",
|
||||
"Lib/Vendor/Box2D",
|
||||
"Game/Server/Player",
|
||||
"Game/Server/GameObjects/GameObject",
|
||||
"Game/Server/GameObjects/Doll",
|
||||
"Game/Server/GameObjects/Items/RagDoll"
|
||||
"Game/Channel/Player",
|
||||
"Game/Channel/GameObjects/GameObject",
|
||||
"Game/Channel/GameObjects/Doll",
|
||||
"Game/Channel/GameObjects/Items/RagDoll"
|
||||
],
|
||||
|
||||
function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, Nc, Box2D, Player, GameObject, Doll, RagDoll) {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
define([
|
||||
"Game/Core/GameObjects/Doll",
|
||||
"Game/Server/GameObjects/Item",
|
||||
"Game/Channel/GameObjects/Item",
|
||||
"Lib/Vendor/Box2D",
|
||||
"Lib/Utilities/NotificationCenter"
|
||||
],
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
define([
|
||||
"Lib/Utilities/NotificationCenter",
|
||||
"Game/Server/Channel"
|
||||
"Game/Channel/Channel"
|
||||
],
|
||||
|
||||
function (Nc, Channel) {
|
||||
|
||||
function PipeToLobby (process) {
|
||||
function PipeToServer (process) {
|
||||
|
||||
var self = this;
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ function (Nc, Channel) {
|
|||
});
|
||||
}
|
||||
|
||||
PipeToLobby.prototype.send = function (recipient, data) {
|
||||
PipeToServer.prototype.send = function (recipient, data) {
|
||||
var message = {
|
||||
recipient: recipient,
|
||||
data: data
|
||||
|
|
@ -37,10 +37,10 @@ function (Nc, Channel) {
|
|||
this.process.send(message);
|
||||
};
|
||||
|
||||
PipeToLobby.prototype.onMessage = function (message) {
|
||||
PipeToServer.prototype.onMessage = function (message) {
|
||||
Nc.trigger(message.recipient + '/controlCommand', message);
|
||||
}
|
||||
|
||||
return PipeToLobby;
|
||||
return PipeToServer;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue