public static void ActivatePower(Power power) { Debug.Log(string.Format("Activated power {0}", power)); PowerTimer = PowerTimerMax; ActivePower = power; SoundBoard.PlayCard(); switch (power) { case Power.AlternatePath: FollowAlternatePath = true; break; case Power.Coin2x: CoinPoints = DefaultCoinPoints * 2; break; case Power.HalvePenalty: EnemyPointLoss = DefaultEnemyLoss / 2; break; case Power.Invincible: PlayerInvincible = true; break; case Power.Speed2x: PlayerSpeed = DefaultPlayerSpeed * 2; break; } }
void OnMouseUpAsButton() { GameOverScreen.Hide(); GameState.ResetPlayer(); GameState.LevelReset(); GameState.GameReset(); GameState.CurrentMode = GameState.PlayMode.Started; SoundBoard.PlayCard(); }
void OnMouseUpAsButton() { if (GameState.CurrentMode == GameState.PlayMode.NotStarted) { GameState.CurrentMode = GameState.PlayMode.Started; sprite.SetSprite(DiscardButton); SoundBoard.PlayCard(); } else if (GameState.PowerTimer <= 0 && GameState.DiscardTimer <= 0) { GameState.DiscardTimer = GameState.DiscardTimerMax; GameState.PickNewPower(false); SoundBoard.PlayCard(); } }