Esempio n. 1
0
 //called to indicate that an action has been started, prevent any other action from starting
 public static void ActionCommenced()
 {
     if (actionInProgress == 0)
     {
         TBTK.OnGameInAction(true);
     }
     actionInProgress += 1;
 }
Esempio n. 2
0
        IEnumerator _ActionCompleted(float delay = 0)
        {
            if (delay > 0)
            {
                yield return(new WaitForSeconds(delay));
            }
            actionInProgress = Mathf.Max(0, actionInProgress -= 1);
            //yield return null;

            if (actionInProgress == 0)
            {
                TBTK.OnGameInAction(false);
            }
        }