menu placeholder
This commit is contained in:
@@ -111,6 +111,7 @@ public class CanvasView extends View
|
|||||||
}
|
}
|
||||||
case GameStateInterface.GS_GAMEOVER:
|
case GameStateInterface.GS_GAMEOVER:
|
||||||
{
|
{
|
||||||
|
Gamemenu.SetGameState(Foreground.GetGameState(), true);
|
||||||
Foreground = Gamemenu;
|
Foreground = Gamemenu;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ public class GameMenu extends GameStateInterface
|
|||||||
ShowPauseMenu(canvas);
|
ShowPauseMenu(canvas);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GS_GAMEOVER:
|
||||||
|
{
|
||||||
|
ShowGameOverMenu(canvas);
|
||||||
|
SetGameState(GS_MENU_READY, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,6 +89,11 @@ public class GameMenu extends GameStateInterface
|
|||||||
canvasView.postInvalidate();
|
canvasView.postInvalidate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GS_GAMEOVER:
|
||||||
|
{
|
||||||
|
canvasView.postInvalidate();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPostBack)
|
if (!isPostBack)
|
||||||
@@ -168,6 +179,11 @@ public class GameMenu extends GameStateInterface
|
|||||||
Rect(canvas, 0f, 160f, 0f, 90f, Color.RED);
|
Rect(canvas, 0f, 160f, 0f, 90f, Color.RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShowGameOverMenu(Canvas canvas)
|
||||||
|
{
|
||||||
|
Rect(canvas, 0f, 160f, 0f, 90f, Color.parseColor("lime"));
|
||||||
|
}
|
||||||
|
|
||||||
// other logic
|
// other logic
|
||||||
private void Rect(Canvas canvas, float Top, float Bottom, float Left, float Right, int Color)
|
private void Rect(Canvas canvas, float Top, float Bottom, float Left, float Right, int Color)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1361,6 +1361,7 @@ public class GamePlay extends GameStateInterface
|
|||||||
{
|
{
|
||||||
mp.start();
|
mp.start();
|
||||||
SetGameState(GS_PLAYING, false);
|
SetGameState(GS_PLAYING, false);
|
||||||
|
canvasView.postInvalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InputsGamePlaying(float x, float y, boolean Released)
|
private void InputsGamePlaying(float x, float y, boolean Released)
|
||||||
|
|||||||
Reference in New Issue
Block a user