mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
Moved menu to require.js style, ref #77
This commit is contained in:
parent
2213a50623
commit
1a6d8effad
4 changed files with 81 additions and 83 deletions
10
client.js
10
client.js
|
|
@ -14,12 +14,13 @@ requirejs([
|
|||
"Lib/Vendor/SocketIO",
|
||||
"Game/Config/Settings",
|
||||
"Lib/Utilities/Exception",
|
||||
"Lib/Vendor/Pixi"
|
||||
"Menu/Menu"
|
||||
],
|
||||
|
||||
function (Networker, SocketIO, Settings, Exception, PIXI) {
|
||||
function (Networker, SocketIO, Settings, Exception, Menu) {
|
||||
|
||||
Chuck.run = function(channelName, nickname) {
|
||||
var menu = new Menu();
|
||||
menu.onRun = function(channelName, nickname) {
|
||||
var options = {
|
||||
"reconnect": false,
|
||||
"reconnection delay": 500,
|
||||
|
|
@ -33,6 +34,7 @@ function (Networker, SocketIO, Settings, Exception, PIXI) {
|
|||
var networker = new Networker(socket, channelName, nickname);
|
||||
Chuck.inspector.networker = networker;
|
||||
Chuck.inspector.settings = Settings;
|
||||
Chuck.inspector.resetLevel = function() { networker.sendGameCommand("resetLevel"); }
|
||||
Chuck.inspector.resetLevel = function() { networker.sendGameCommand("resetLevel"); }
|
||||
}
|
||||
menu.init();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue