예제 #1
0
    public bool RemoveMana(int manaToRemove)
    {
        int mana = Mana.GetAmount() - manaToRemove;

        Mana.SetAmount(mana);
        return(Mana.IsFull());
    }
예제 #2
0
    public virtual bool DealDamage(SSlot slot, int acolor, int power)
    {
        if (_dead)
        {
            Debug.LogError("DEAD!");
            return(false);
        }
        //TODO paper/scissors/stone!!!
        int lives = Lives.GetAmount() - power;

        Lives.SetAmount(lives);
        _dead = Lives.GetAmount() == 0;
        if (_dead)
        {
            slot.TakePipe();
            GameManager.Instance.Game.ACharacters.OnCharacterDied(this);
            PlayDeathAnimation();
        }
        else
        {
            PlayGainDamageAnimation();
        }
        return(_dead);
    }
예제 #3
0
 public virtual bool DealDamage(int power, int acolor)
 {
     if (_dead)
     {
         Debug.LogError("DEAD!");
         return(true);
     }
     //TODO paper/scissors/stone!!!
     //if (acolor >= 0 && acolor == Color)
     //{
     //    power *= 2;
     //}
     Lives.SetAmount(Lives.GetAmount() - power);
     _dead = Lives.IsEmpty();
     PlayGainDamageAnimation();
     return(_dead);
 }