Browse Source

Revert "SpaceGame modified for client/server."

This reverts commit b5bc0dbfb040418c261f86d81f5d18925751408c.
Josh Engebretson 9 years ago
parent
commit
24ec40856c
2 changed files with 5 additions and 22 deletions
  1. 0 9
      SpaceGame/Resources/Components/SpaceGame.js
  2. 5 13
      SpaceGame/Resources/UI/mainMenu.js

+ 0 - 9
SpaceGame/Resources/Components/SpaceGame.js

@@ -6,7 +6,6 @@ var options = require("UI/options")
 exports.component = function(self) {
 exports.component = function(self) {
 
 
   var game = Atomic.game;
   var game = Atomic.game;
-  var network;
 
 
   // expose ourselves as a global, this is invalid in "use strict"; which perhaps we should be using
   // expose ourselves as a global, this is invalid in "use strict"; which perhaps we should be using
   // to enforce better form
   // to enforce better form
@@ -247,17 +246,9 @@ exports.component = function(self) {
       Atomic.input.bindButton(self.fireButton, Atomic.KEY_SPACE);
       Atomic.input.bindButton(self.fireButton, Atomic.KEY_SPACE);
     }
     }
 
 
-    var spaceNode =self.myscene.createChild("SpaceBackground");
-    spaceNode.createJSComponent("Components/SpaceBackground.js");
-
     spawnPlayer();
     spawnPlayer();
     spawnEnemies();
     spawnEnemies();
 
 
-    // Start server
-    network = new Atomic.Network();
-
-    network.startServerSimple(27000, self.myscene);
-
   }
   }
 
 
 
 

+ 5 - 13
SpaceGame/Resources/UI/mainMenu.js

@@ -6,7 +6,6 @@ var UI = Atomic.UI;
 var UIWindow = Atomic.UIWindow;
 var UIWindow = Atomic.UIWindow;
 
 
 var window;
 var window;
-var network;
 
 
 function closeWindow() {
 function closeWindow() {
 
 
@@ -38,26 +37,19 @@ exports.init = function() {
 
 
     closeWindow();
     closeWindow();
 
 
-    game.createScene2D();
+  	var node = game.scene.createChild("SpaceGame");
+  	node.createJSComponent("Components/SpaceGame.js");
 
 
-    var node = game.scene.createChild("SpaceGame");
-    node.createJSComponent("Components/SpaceGame.js");
   }
   }
 
 
   window.getWidget("about").onClick = function () {
   window.getWidget("about").onClick = function () {
 
 
-    closeWindow();
-
     // disable ourselves until ok is clicked on about
     // disable ourselves until ok is clicked on about
-    //window.setState(UI.WIDGET_STATE_DISABLED, true);
-
-    //var ui = require("./ui");
-    //ui.showAbout(function() {window.setState(UI.WIDGET_STATE_DISABLED, false);});
+    window.setState(UI.WIDGET_STATE_DISABLED, true);
 
 
-    game.createScene2D();
+    var ui = require("./ui");
+    ui.showAbout(function() {window.setState(UI.WIDGET_STATE_DISABLED, false);});
 
 
-    network = new Atomic.Network();
-    network.connectSimple('127.0.0.1', 27000, game.scene); 
   }
   }
 
 
   window.getWidget("options").onClick = function () {
   window.getWidget("options").onClick = function () {