public override void Execute() { Column pColumn = (Column)this.pAlien.pParent; Grid pGrid = (Grid)pColumn.pParent; this.pAlien.Remove(); pColumn.alienCount--; pGrid.alienCount--; TimerManager.UpdateTimerManager(pGrid); if (pColumn.alienCount == 0) { ((GameObject)pColumn).Remove(); pGrid.colCount--; } if (pGrid.alienCount == 0) { // Round over! Start next round ((GameObject)pGrid).Remove(); ScoreManager.OneUp(); //ShipManager.MoveShip(150.0f, 100.0f); TimerManager.ClearTimerManager(); UFOManager.Deactivate(); //TimerManager.Dump(); Game pGame = GameManager.GetGame(); pGame.roundNum++; GameManager.ActivateGame(false); UFOManager.Activate(); TimerManager.InitializeTimerManager(); } }
public override void Update() { Game pGame = GameManager.GetGame(); if (pGame.GetState() is GameSelectState) { GameManager.ActivateGame(pGame.roundNum == 1); TimerManager.InitializeTimerManager(); } }