protected virtual void OnCollidedWithBullet(BaseBullet i_Bullet) { if (PlayerCollided != null) { PlayerCollided.Invoke(this, i_Bullet); } }
public override void Collided(ICollidable i_Collidable) { BaseBullet bullet = i_Collidable as BaseBullet; Enemy enemy = i_Collidable as Enemy; if (bullet != null) { OnCollidedWithBullet(bullet); } else if (enemy != null) { OnCollidedWithEnemy(enemy); } }