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"); } }
public void OnAttack(GameDamageManager.DMGRegistry dmgCard) { throw new System.NotImplementedException(); }