public static lhObjectManager GetInstance()
 {
     if (m_instance != null)
     {
         return(null);
     }
     return(m_instance = new lhObjectManager());
 }
 static int Dispose(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LaoHan.Infrastruture.lhObjectManager obj = (LaoHan.Infrastruture.lhObjectManager)ToLua.CheckObject(L, 1, typeof(LaoHan.Infrastruture.lhObjectManager));
         obj.Dispose();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetInstance(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LaoHan.Infrastruture.lhObjectManager o = LaoHan.Infrastruture.lhObjectManager.GetInstance();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 4
0
 private void InitializeBase()
 {
     m_debug     = lhDebug.GetInstance();
     m_coroutine = lhCoroutine.GetInstance();
     m_invoke    = lhInvoke.GetInstance();
     m_loom      = lhLoom.GetInstance();
     m_loop      = lhLoop.GetInstance();
     m_resources = lhResources.GetInstance();
     m_component = lhComponent.GetInstance();
     m_cacheData = lhCacheData.GetInstance();
     m_random    = lhRandom.GetInstance(UnityEngine.Random.Range(0, int.MaxValue));
     m_frame     = lhFrame.GetInstance(5);
     m_frame.AutoFPS(25, 60);
     m_objectManager = lhObjectManager.GetInstance();
     m_assetManager  = lhAssetManager.GetInstance();
     m_sourceUpdate  = lhSourceUpdate.GetInstance();
 }