Exemplo n.º 1
0
    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;
        }
    }
Exemplo n.º 2
0
 void OnMouseUpAsButton()
 {
     GameOverScreen.Hide();
     GameState.ResetPlayer();
     GameState.LevelReset();
     GameState.GameReset();
     GameState.CurrentMode = GameState.PlayMode.Started;
     SoundBoard.PlayCard();
 }
Exemplo n.º 3
0
 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();
     }
 }