Пример #1
0
 /*--------------------------------------------------------------------------------------*/
 /*																						*/
 /*	OnStartTimerEvent: Handler for OnStartTimerEvent Event								*/
 /*			param:																		*/
 /*				GameEvent ige - access to readonly variables in event					*/
 /*																						*/
 /*--------------------------------------------------------------------------------------*/
 void OnStartTimerEvent(StartTimerEvent startEvent)
 {
     stopTimer = false;
     if (startEvent.decrementTime)
     {
         StartCoroutine(DecrementTimer());
     }
     else
     {
         StartCoroutine(IncrementTimer());
     }
 }
Пример #2
0
    /*public static TimerManager GetInstance()
     * {
     *  if (s_Instance)
     *      return s_Instance;
     *  else
     *      return null;
     * }*/

    public void StartTimerCallback(GameEvent e)
    {
        StartTimerEvent ev = (StartTimerEvent)e;

        Timers.Add(new Timer(ev.TimerId, ev.Duration, true, ev.Callback));
    }
Пример #3
0
 private void OnStartTimerEvent(StartTimerEvent evt)
 {
     StartCoroutine(UpdateStartGameUI());
 }