public void StopShooting() { if (action == null) { return; } TimedActionManager .GetInstance() .UnregisterAction(action, this); action = null; }
public void StartShooting(float interval) { if (action != null) { Debug.Log("[TurretEntity] Turret is already shooting"); return; } action = TimedActionManager .GetInstance() .RegisterAction( () => { DoShoot(); }, this, interval ); }