private void checkKeysForTitle() { if (keymanage.getKeysDownFrame(Keys.Enter) > 0) { onGameState = StatusOnGame.Preparation; } }
public MainGame(KeyManager keymanager) { this.keymanager = keymanager; this.title = new Title(Resources.IMG_0013); onGameState = StatusOnGame.Title; reset(); }
private void checkKeyForGameClear() { if (keymanager.OnEnter) { onGameState = StatusOnGame.Preparation; reset(); } if (keymanager.OnSpace) { onGameState = StatusOnGame.Title; reset(); } }
private void GameclearCheck() { int lifesum = 0; for (int i = 0; i < blocks.GetLength(0); i++) { for (int j = 0; j < blocks.GetLength(1); j++) { lifesum += blocks[i, j].Life; } } if (lifesum == 0) { onGameState = StatusOnGame.GameClear; } }
private void GameOverCheck() { if ((ball.Y + ball.Height) > bg.Y + bg.Height) { plife = plife - 1; ball.Dx = Ballspeed; ball.Dy = Ballspeed; onGameState = StatusOnGame.Preparation; if (plife < 0) { plife = 0; onGameState = StatusOnGame.GameOver; bar.stop(); } } }
private void checkeyForPreparation() { if (keymanager.OnLeft && keymanager.OnRight) { bar.stop(); } else if (keymanager.OnLeft) { bar.moveL(); } else if (keymanager.OnRight) { bar.moveR(); } else { bar.stop(); } if (keymanager.OnUp) { ball.StickingBarMotion(bar); onGameState = StatusOnGame.Playing; } }