Пример #1
0
 static int OnDestroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Framework.Singleton <Framework.SceneMgr> obj = (Framework.Singleton <Framework.SceneMgr>)ToLua.CheckObject <Framework.Singleton <Framework.SceneMgr> >(L, 1);
         obj.OnDestroy();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #2
0
 static int Init(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Framework.Singleton <Framework.LuaUtility> obj = (Framework.Singleton <Framework.LuaUtility>)ToLua.CheckObject <Framework.Singleton <Framework.LuaUtility> >(L, 1);
         obj.Init();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
    static int Init(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.Singleton<Framework.LuaUtility>.Init");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 1);
            Framework.Singleton <Framework.LuaUtility> obj = (Framework.Singleton <Framework.LuaUtility>)ToLua.CheckObject <Framework.Singleton <Framework.LuaUtility> >(L, 1);
            obj.Init();
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #4
0
 public static void Destroy()
 {
     Singleton.ReleaseManager <T>();
     _isCreated = false;
     _instance.Dispose();
 }