OSDN Git Service

fixed gdx invader screen transitions
authorbadlogic <contact@badlogicgames.com>
Tue, 9 Oct 2012 11:33:15 +0000 (13:33 +0200)
committerbadlogic <contact@badlogicgames.com>
Tue, 9 Oct 2012 11:33:15 +0000 (13:33 +0200)
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/GdxInvaders.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/screens/GameOver.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/screens/MainMenu.java

index e749b6e..1ef8f5a 100644 (file)
@@ -42,10 +42,6 @@ public class GdxInvaders extends Game {
                // next screen. Ideally the screen transitions are handled\r
                // in the screen itself or in a proper state machine.\r
                if (currentScreen.isDone()) {\r
-                       // dispose music\r
-                       music.dispose();\r
-                       music = null;\r
-                       \r
                        // dispose the resources of the current screen\r
                        currentScreen.dispose();\r
 \r
index df309e7..fb9e9de 100644 (file)
@@ -89,7 +89,7 @@ public class GameOver extends InvadersScreen {
 \r
        @Override\r
        public void update (float delta) {\r
-               if (Gdx.input.isTouched()) {\r
+               if (Gdx.input.justTouched()) {\r
                        isDone = true;\r
                }\r
        }\r
index 3cd53c2..3f97d2c 100644 (file)
@@ -60,7 +60,7 @@ public class MainMenu extends InvadersScreen {
 \r
        @Override\r
        public void update (float delta) {\r
-               if (Gdx.input.isTouched()) {\r
+               if (Gdx.input.justTouched()) {\r
                        isDone = true;\r
                }\r
        }\r