Exemplo n.º 1
0
 //Deal damage to the enemy if it is the target, then raise the stun flag.
 public void OnHit(BaseEnemy enemyHit)
 {
     if (enemyHit == target)
     {
         if (this != null)
         {
             StatusEffectManager.OnStun(STUN_TIME, enemyHit.GetInstanceID());
             enemyHit.health -= damage;
             pool.Return(gameObject);
         }
     }
 }