コード例 #1
0
 public void AddTimer(GameObject go, string timerName, float delay, TimerManager.UpdateFunc func)
 {
     if (!this.timers.ContainsKey(timerName))
     {
         LuaTimerBehaviour luaTimerBehaviour = go.AddComponent <LuaTimerBehaviour>();
         luaTimerBehaviour.StartTimer(delay, func);
         this.timers.Add(timerName, luaTimerBehaviour);
     }
 }
コード例 #2
0
 public void AddRepeatingTimer(GameObject go, string timerName, float delay, float interval, TimerManager.UpdateFunc func)
 {
     Debugger.Log("AddRepeatingTimer: " + timerName);
     if (!this.timers.ContainsKey(timerName))
     {
         LuaTimerBehaviour luaTimerBehaviour = go.AddComponent <LuaTimerBehaviour>();
         luaTimerBehaviour.StartRepeatingTimer(delay, interval, func);
         this.timers.Add(timerName, luaTimerBehaviour);
     }
 }