protected virtual void CollisionDetection() { for (int i = 0; i < _hopsPerFrame; i++) { if (DistanceFromTarget() > _activationDistance) { Vector3 trajictory = target.transform.position - transform.position; trajictory.Normalize(); transform.Translate(trajictory * _hopDistance, Space.World); } else { EnemyMoveSpt.GiveDamage(target, Damage); ProjectileEvents.OnHitEnemy.Invoke(this, target); Exploded = true; break; } } }
protected virtual void Shoot() { shootBehaviour.Shoot(target); canShoot = false; EnemyMoveSpt.GiveDamage(target, Damage); }