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