void Update() { if (action != null) { if (action.Update()) { action = null; } } }
public bool Action(IFireAction action, bool force = false) { if (this.action != null) { if (force) { this.action.Cancel(); this.action = null; } else { return(false); } } if (action != null) { action.FireSystem = this; action.Init(); this.action = action; return(true); } return(false); }
void Start() { ammo = countAmmo; magazine = countMagazine; fireAction = GetComponent <IFireAction>(); }