public static void KillTimer(MeTimer timer) { if (timer != null) { timer.close = true; } }
static public int set_onCompleted(IntPtr l) { try { MeTimer self = (MeTimer)checkSelf(l); Callback <MeTimer> v; int op = LuaDelegation.checkDelegate(l, 2, out v); if (op == 0) { self.onCompleted = v; } else if (op == 1) { self.onCompleted += v; } else if (op == 2) { self.onCompleted -= v; } pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_close(IntPtr l) { try { MeTimer self = (MeTimer)checkSelf(l); pushValue(l, true); pushValue(l, self.close); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { MeTimer o; o = new MeTimer(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_id(IntPtr l) { try { MeTimer self = (MeTimer)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.id = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public static MeTimer AddTimer(float interval, int loop, Callback <MeTimer> onTimerHander) { if (LuaMeTimer.obj == null) { LuaMeTimer.obj = new GameObject("~MeLuaTimer"); LuaMeTimer.obj.AddComponent <LuaMeTimer>(); GameObject meGo = GameObject.Find("~ME~"); if (meGo == null) { meGo = new GameObject("~ME~"); } LuaMeTimer.obj.transform.SetParent(meGo.transform); } MeTimer timer = new MeTimer(); timer.onTimer = onTimerHander; timer.interval = interval; timer.loop = loop; LuaMeTimer.TimerList.Add(timer); return(timer); }
public static MeTimer AddTimer(float interval, int loop, Callback<MeTimer> onTimerHander) { if (LuaMeTimer.obj == null) { LuaMeTimer.obj = new GameObject("~MeLuaTimer"); LuaMeTimer.obj.AddComponent<LuaMeTimer>(); GameObject meGo = GameObject.Find("~ME~"); if (meGo == null) { meGo = new GameObject("~ME~"); } LuaMeTimer.obj.transform.SetParent(meGo.transform); } MeTimer timer = new MeTimer(); timer.onTimer = onTimerHander; timer.interval = interval; timer.loop = loop; LuaMeTimer.TimerList.Add(timer); return timer; }