Example #1
0
 void Update()
 {
     if (action != null)
     {
         if (action.Update())
         {
             action = null;
         }
     }
 }
Example #2
0
 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);
 }
Example #3
0
 void Start()
 {
     ammo       = countAmmo;
     magazine   = countMagazine;
     fireAction = GetComponent <IFireAction>();
 }