Example #1
0
    public void Init()
    {
        if (_HasInitialized)
        {
            return;
        }
        _HasInitialized = true;

        DontDestroyOnLoad(this);
        gameObject.name = GetType().ToString();
        if (Debugger.LogToFile == true)
        {
            gameObject.AddComponent <DebuggerFileOutput>();
        }
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        Screen.autorotateToLandscapeLeft      = true;
        Screen.autorotateToLandscapeRight     = true;
        Screen.autorotateToPortrait           = false;
        Screen.autorotateToPortraitUpsideDown = false;
        SingletonManager.Init();
        ArchiveManager.instance.Init();
        ConfigDataManager.instance.LoadCSV <LocCSV>("Loc");
        ConfigDataManager.instance.LoadCSV <UICSV>("UI");
        LocManager.instance.Init(LocLang.English);
        _DelayCallUtil = gameObject.AddComponent <DelayCallUtil>();
        MessageManager.instance.Init();
    }
 static int Init(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         SingletonManager <ResourceMgr> obj = (SingletonManager <ResourceMgr>)ToLua.CheckObject <SingletonManager <ResourceMgr> >(L, 1);
         obj.Init();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
 void Start()
 {
     SingletonManager.Init();
     LogicModuleManager.Inst.InitGameModules();
     S_GlobalConfig.m_eGameState = E_GlobalGameState.Game;
 }