示例#1
0
 public bool Attack(UnitStats targetStats)
 {
     if (!(_attackCooldown <= 0))
     {
         return(false);
     }
     targetStats.TakeDamage(_myStats.Damage.GetValue());
     EventOnAttack?.Invoke();
     _attackCooldown = 1f / _attackSpeed;
     return(true);
 }
示例#2
0
 public void TakeDamage(GameObject user, int damage)
 {
     _stats.TakeDamage(damage);
     DamageWithCombat(user);
 }