コード例 #1
0
 public static void RealTimeUpdate()
 {
     while (actionQueue.Count > 0 && actionQueue.Peek().time <= time)
     {
         GameAction action = actionQueue.Dequeue();
         if (!action.actually)
         {
             continue;
         }
         action.DoAction();
     }
 }
コード例 #2
0
    private void Update()
    {
        if (IsCountingDown)
        {
            timeRemaining -= Time.deltaTime;

            if (timeRemaining <= 0)
            {
                timeRemaining  = 0;
                IsCountingDown = false;
                if (GameAction)
                {
                    GameAction.DoAction();
                }
            }

            if (Display)
            {
                Display.text = "Time Remaining: \n" + System.Math.Floor(timeRemaining);
            }
        }
    }