Exemple #1
0
    void Start()
    {
        Application.logMessageReceived += OnUnityLog;
        UnityEngine.Random.InitState(DateTime.UtcNow.Second);
        StaticDataLite.Init();
        UIEngine.Init();
        PlayerStatus.Read();
        UIEngine.Forward("LoadingPage", null, new Admission_None());
        //UIEngine.Forward<LevelCompletePage>();
        if (GameInfo.ForceDeveloper)
        {
            var commandline = UIEngine.ShowFloating <CommandLineFloating>(null, UIDepth.Top);
        }
        if (GameInfo.ForceRemoveAd)
        {
            PlayerStatus.removeAd = true;
        }
        PushManager.ResetNotification();

        // 摄像机渲染区域默认根据高去调整宽
        // 但是这里需要根据宽调整高
        // 因此需要手动设置摄像机的渲染高度,达到宽度固定 1080 效果

        heightScale = CameraUtil.SetCameraSizeByDecisionRevelutionAndFixAtWidth(1080, 1920);

        var silence = GameManifestFinal.Get("silence", "false");

        if (silence == "true")
        {
            AudioManager.Volume = 0;
        }
    }