Browse Source

Tweaks for new space game

Josh Engebretson 10 years ago
parent
commit
9ab580de8e

+ 4 - 0
NewSpaceGame/Resources/Components/HUD.js

@@ -13,6 +13,10 @@ view.addChild(layout);
 
 
 SpaceGame.viewport.rect = layout.getWidget("viewport").rect;
 SpaceGame.viewport.rect = layout.getWidget("viewport").rect;
 
 
+self.cleanup = function() {
+	view.removeChild(layout);
+}
+
 var scoretext = layout.getWidget("scoretext");
 var scoretext = layout.getWidget("scoretext");
 
 
 //UI.debugShowSettingsWindow(view);
 //UI.debugShowSettingsWindow(view);

+ 1 - 1
NewSpaceGame/Resources/Components/Player.js

@@ -84,7 +84,7 @@ function start() {
     sprite2D.sprite = spaceSheet.getSprite("spaceship_mantis");
     sprite2D.sprite = spaceSheet.getSprite("spaceship_mantis");
     sprite2D.blendMode = Atomic.BLEND_ALPHA;
     sprite2D.blendMode = Atomic.BLEND_ALPHA;
 
 
-    node.position2D = [0, -SpaceGame.halfHeight + 1];
+    node.position2D = [0, -SpaceGame.halfHeight + .65];
 
 
 }
 }
 
 

+ 3 - 1
NewSpaceGame/Resources/Components/SpaceGame.js

@@ -62,7 +62,7 @@ function spawnEnemies() {
 
 
     pos[1] = self.halfHeight - 2.5;
     pos[1] = self.halfHeight - 2.5;
 
 
-    for (var y = 0; y < 3; y++) {
+    for (var y = 0; y < 2; y++) {
 
 
         pos[0] = -4.5;
         pos[0] = -4.5;
 
 
@@ -111,6 +111,8 @@ function updateEnemies(timeStep) {
 self.cleanup = function() {
 self.cleanup = function() {
 
 
   game.renderer.setViewport(1, null);
   game.renderer.setViewport(1, null);
+
+  self.hud.cleanup();
   Atomic.destroy(self.myscene);
   Atomic.destroy(self.myscene);
 
 
   // our node is in the main scene
   // our node is in the main scene

+ 1 - 1
NewSpaceGame/Resources/UI/about.ui.txt

@@ -1,7 +1,7 @@
 TBLayout: axis: y
 TBLayout: axis: y
 	TBEditField: multiline: 1, styling: 1, gravity: all, id: about_text, readonly: 1, adapt-to-content: 0
 	TBEditField: multiline: 1, styling: 1, gravity: all, id: about_text, readonly: 1, adapt-to-content: 0
 		font: size: 18
 		font: size: 18
-		lp: max-width: 800, min-width: 800, min-height: 512, max-height: 512
+		lp: max-width: 512, min-width: 512, min-height: 340, max-height: 340
 		text: "..."
 		text: "..."
 	TBButton: text: OK, id: ok
 	TBButton: text: OK, id: ok
 		lp: min-width: 128, min-height: 48
 		lp: min-width: 128, min-height: 48

+ 3 - 3
NewSpaceGame/Resources/UI/options.ui.txt

@@ -1,10 +1,10 @@
 TBLayout: axis: y, size: available
 TBLayout: axis: y, size: available
-	TBClickLabel: text: "Post Process: Black & White"
-		font: size: 24
-		TBCheckBox: id: "ppbw"
 	TBClickLabel: text: "Post Process: Blur"
 	TBClickLabel: text: "Post Process: Blur"
 		font: size: 24
 		font: size: 24
 		TBCheckBox: id: "ppblur"
 		TBCheckBox: id: "ppblur"
+	TBClickLabel: text: "Post Process: Black & White"
+		font: size: 24
+		TBCheckBox: id: "ppbw"
 	TBButton: text: OK, id: ok
 	TBButton: text: OK, id: ok
 		font: size: 24
 		font: size: 24
 		lp: min-width: 128, min-height: 48
 		lp: min-width: 128, min-height: 48