Ejemplo n.º 1
0
        public void OnAttack(GameDamageManager.DMGRegistry dmgCard)
        {
            try
            {
                _hp -= dmgCard.unitStats.atk;

                if (_hp <= 0)
                {
                    if (dmgCard.fromUnit != null)
                    {
                        TowerUnit towerUnit = (TowerUnit)dmgCard.fromUnit;
                        if (towerUnit != null && towerUnit.buildPlayer != null)
                        {
                            towerUnit.buildPlayer.EarnPrize(_monsterStats.prize);
                        }
                    }

                    Destroy();
                }
            }
            catch {
                Debug.Log("OnAttack error occur");
            }
        }
Ejemplo n.º 2
0
 public void OnAttack(GameDamageManager.DMGRegistry dmgCard)
 {
     throw new System.NotImplementedException();
 }