private void Update() { if (LuaEnv != null && Time.time - _lastGCTime > _gcInternal) { LuaEnv.Tick(); _lastGCTime = Time.time; } }
/// <summary> /// 更新 /// </summary> public void Update() { if (m_awake) { m_luaEnv.Tick(); m_update(); } }
private void Update() { if (Time.time - lastGCTime > 1f) { luaEnv.Tick(); lastGCTime = Time.time; } }
void Update() { if (Time.time - lastGCTime > GCInterval) { luaEnv.Tick(); lastGCTime = Time.time; } }
private void Update() { if (Time.time - LuaBehaviour.lastGCTime > GCInterval) { luaEnv.Tick(); LuaBehaviour.lastGCTime = Time.time; } }
// Update is called once per frame void Update() { if (luaEnv != null) { //清除Lua未手动释放的Luabase对象 luaEnv.Tick(); } }
// Update is called once per frame void Update() { if (luaUpdate != null) { luaUpdate(Time.unscaledTime, Time.time); } luaEnv.Tick(); }
private void OnUpdate() { if (Time.time - m_lastGCTime > m_GCInterval) { m_LuaVM.Tick(); m_lastGCTime = Time.time; } }
void Update() { _luaUpdate?.Invoke(); if (Time.time - LastGcTime > GcInterval) { LuaEnv.Tick(); LastGcTime = Time.time; } }
//渲染函数 public void OnUpdate() { _luaOnUpdate?.Invoke(Time.deltaTime); if (Time.time - _lastGCTime > _gcInterval) { _luaEnv.Tick(); _lastGCTime = Time.time; } }
// Update is called once per frame void Update() { _luaEnv.Tick(); if (_luaUpdate == null) { _luaUpdate = _luaEnv.Global.GetInPath <Action <float> >("__G__UPDATE__"); } _luaUpdate(Time.deltaTime); }
/// <summary> /// 每帧更新 /// </summary> public void Update() { if (!(Time.Time - lastGc > GC_INTERVAL)) { return; } luaEnv.Tick(); lastGc = Time.Time; }
protected virtual void Update() { luaUpdate.Invoke(); if (Time.time - lastGCTime > GCInterval) { luaEnv.Tick(); lastGCTime = Time.time; } }
public static void Update() { //lua GC if (Time.time - GameApp.lastGCTime > GCInterval && luaenv != null) { luaenv.Tick(); GameApp.lastGCTime = Time.time; } }
// Update is called once per frame void Update() { luaUpdate?.Invoke(); if (Time.time - TPLuaBehaviour.lastGCTime > GCInterval) { luaEnv.Tick(); TPLuaBehaviour.lastGCTime = Time.time; } }
/// <summary> /// 释放lua垃圾 /// </summary> /// <param name="str"></param> public void Tick(string str) { if (luaEnv == null) { Debug.Log("解析器为空,需要初始化解析器"); return; } luaEnv.Tick(); }
public void Update() { if (null == env) return; env.Tick(); if (null != OnUpdate) OnUpdate(); }
public override void Update(float elapseTime, float realElapseTime) { gcTime += elapseTime; if (gcTime >= GCInterval) { luaEnv.Tick(); gcTime = 0; } }
//--------------------------------------------------------------------- public void Update(float elapsed_tm) { TickTimeSpanLast += elapsed_tm; if (LuaEnv != null && TickTimeSpanLast > TickTimeSpanMax) { TickTimeSpanLast = 0f; LuaEnv.Tick(); } }
public void Update() { luaUpdate?.Invoke(); if (Time.time - lastGCTime > GCInterval) { luaEnv.Tick(); lastGCTime = Time.time; } }
// Update is called once per frame void Update() { luaenv.Tick(); if (update != null) { update.Action(Time.deltaTime); } }
//--------------------------------------------------------------------- public void Update(float elapsed_tm) { if (LuaEnv != null) { FuncLuaUpdate?.Invoke(elapsed_tm); LuaEnv.Tick(); } }
void Update() { if (luaEnv != null && Time.time - lastGCTime > GCInterval) { luaEnv.Tick(); luaEnv.GcStep(5 * 1024); //luaEnv.FullGc(); lastGCTime = Time.time; } }
/// <summary> /// 释放Lua垃圾 /// </summary> public void Tick() { if (luaEnv == null) { Debug.Log("解析器初始化"); return; } luaEnv.Tick(); }
// Update is called once per frame void Update() { // c# call lua function with value type but no gc (using delegate) f1(1); // primitive type f2(new Vector3(1, 2, 3)); // vector3 MyStruct mystruct1 = new MyStruct(5, 6); f3(mystruct1); // custom complex value type f4(MyEnum.E1); //enum decimal dec1 = -32132143143100109.00010001010M; f5(dec1); //decimal // using LuaFunction.Func<T1, T2, TResult> add.Func <int, int, int>(34, 56); // LuaFunction.Func<T1, T2, TResult> // lua access c# value type array no gc farr(a1); //primitive value type array farr(a2); //vector3 array farr(a3); //custom struct array farr(a4); //enum arry farr(a5); //decimal arry // lua call c# no gc with value type flua(); //c# call lua using interface ie.exchange(a2); //no gc LuaTable use luaenv.Global.Set("g_int", 456); int i; luaenv.Global.Get("g_int", out i); luaenv.Global.Set(123.0001, mystruct1); MyStruct mystruct2; luaenv.Global.Get(123.0001, out mystruct2); decimal dec2 = 0.0000001M; luaenv.Global.Set((byte)12, dec1); luaenv.Global.Get((byte)12, out dec2); int gdata = luaenv.Global.Get <int>("GDATA"); luaenv.Global.SetInPath("GDATA", gdata + 1); int abc = luaenv.Global.GetInPath <int>("A.B.C"); luaenv.Global.SetInPath("A.B.C", abc + 1); luaenv.Tick(); }
// Update is called once per frame void Update() { if (luaEnv != null) { luaEnv.Tick(); if (Time.frameCount % 100 == 0) { luaEnv.FullGc(); } } }
private void Update() { if (luaUpdate != null) { luaUpdate(); } if (luaenv != null) { luaenv.Tick(); } }
void IModule.OnUpdate() { // Update _funUpdate?.Invoke(); // Tick if (_tickTimer.Update(Time.unscaledDeltaTime)) { _luaEnv.Tick(); } }
// Update is called once per frame void Update() { if (Time.time - lastGCTime > GCInterval) { if (_luaEnv != null) { _luaEnv.Tick(); } lastGCTime = Time.time; } }
public void Update() { if (null != luaUpdate) { luaUpdate(Time.deltaTime, Time.unscaledDeltaTime); } if (null != luaEnv) { luaEnv.Tick(); } }