Ejemplo n.º 1
0
    /// <summary>
    /// 初始化
    /// </summary>
    void Initialize()
    {
        BaseBehaviour.Initialize();
        DontDestroyOnLoad(gameObject);  //防止销毁自己

        var gameMgr = ManagementCenter.GetManager <GameManager>();

        if (gameMgr != null)
        {
            gameMgr.Initialize();   //初始化游戏管理器
        }
    }
Ejemplo n.º 2
0
 static int Initialize(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         BaseBehaviour.Initialize();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
    /// <summary>
    /// 初始化
    /// </summary>
    void Initialize()
    {
        BaseBehaviour.Initialize();
        uiMgr      = io.GetManager <UIManager>();
        levelMgr   = io.GetManager <LevelManager>();
        networkMgr = io.GetManager <NetworkManager>();

        DontDestroyOnLoad(gameObject);  //防止销毁自己
        Debugger.enableLog      = AppConst.LogMode;
        Debug.logger.logEnabled = AppConst.LogMode;

        Screen.sleepTimeout         = SleepTimeout.NeverSleep;
        Application.targetFrameRate = AppConst.GameFrameRate;
        QualitySettings.vSyncCount  = 2;

        Screen.SetResolution(1136, 640, false);

        DOTween.Init(true, true, LogBehaviour.Default);

        uiMgr.Initialize();
        networkMgr.Initialize();
        levelMgr.Initialize();
        levelMgr.LoadLevel(LevelType.Login);
    }
Ejemplo n.º 4
0
 public void initializeObject( BaseBehaviour behaviour ) {
     behaviour.Initialize();
     behaviour._initialized = true;
 }