Esempio n. 1
0
 private static void ProcApplicationQuit()
 {
     Boot.InitLogic(false);
     Boot.InitFramework(false);
     Boot.InitCommon(false);
     JW.Common.Log.DestroyInstance();
     JW.Common.SingletonManager.Clear();
 }
Esempio n. 2
0
    /// <summary>
    /// 入口
    /// </summary>
    protected void Start()
    {
        //不销毁
        ExtObject.ExtDontDestroyOnLoad(gameObject);
        JW.Common.Log.LogD("--<color=yellow>Unity Start</color> --");
        //目标帧率
        Application.targetFrameRate = 60;
        //禁止多点触摸
        Input.multiTouchEnabled = false;
        //常亮
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        //Log.LogD("Screen Width:" + Screen.width.ToString());
        //Log.LogD("Screen Height:" + Screen.height.ToString());
        //Log.LogD("Screen currentResolution.width:" + Screen.currentResolution.width.ToString());
        //Log.LogD("Screen currentResolution.height:" + Screen.currentResolution.height.ToString());
        //Resolution[] resolutions = Screen.resolutions;
        //Log.LogD("--------------");
        //foreach (Resolution re in resolutions)
        //{
        //    Log.LogD(re.ToString());
        //}
        //Log.LogD("--------------");
        //if (resolutions.Length > 1)
        //{
        //    Screen.SetResolution(resolutions[resolutions.Length - 1].width, resolutions[resolutions.Length - 1].height, true);
        //}
        //else
        //{
        //    Screen.SetResolution(1080, 1920, true);
        //}

        //必须全屏
        int xscreen = (int)GetSystemMetrics(SM_CXSCREEN);
        int yscreen = (int)GetSystemMetrics(SM_CYSCREEN);

        Log.LogD("Win32 GetSystemMetrics:{0:D}:{1:D}", xscreen, yscreen);
        Screen.SetResolution(xscreen, yscreen, true);
        Screen.fullScreen = true;
        //鼠标
#if !UNITY_EDITOR && JW_RELEASE
        Cursor.visible = false;
#endif
        JW.Common.Log.LogD("-- Init Common --");
        Boot.InitCommon(true);
        JW.Common.Log.LogD("-- Init Framwwork --");
        Boot.InitFramework(true);
        JW.Common.Log.LogD("-- Init Logic --");
        Boot.InitLogic(true);
        JW.Common.Log.LogD("---<color=yellow>Run Run Run</color> ---");
        Boot.Run();
    }