예제 #1
0
        //获取native 的配置信息
        static IEnumerator UF_IGetNativeInfo()
        {
            Debugger.UF_Log("Start Get Native info");
            float starttick = System.Environment.TickCount;
            float interval  = 1000;

            VendorSDK.UF_Call("onNativeInfo", "");
            while (NativeInfo == null)
            {
                if (NativeInfo != null || Mathf.Abs(System.Environment.TickCount - starttick) > interval)
                {
                    Debugger.UF_Error("Get Native Info Timeout");
                    break;
                }
                yield return(null);
            }
            if (NativeInfo != null)
            {
                Debugger.UF_Log(string.Format("Native Info:\n{0}", NativeInfo.UF_Serialize()));
                //自动适配刘海屏幕
                UIManager.UF_GetInstance().UF_AutoFitNotchScreen();
            }
            else
            {
                Debugger.UF_Warn("Can not Get Native Info !");
            }
        }
예제 #2
0
 public static void UF_SafeCall(string method, string arg)
 {
     FrameHandle.UF_CallMethod(
         () => {
         VendorSDK.UF_Call(method, arg);
     }
         );
 }
예제 #3
0
        void Awake()
        {
            try{
                DontDestroyOnLoad(this);
                s_GameMaim = this;
                s_Root     = this.gameObject;

                FrameHandle.UF_AddHandle(Debugger.UF_GetInstance());
                //System
                FrameHandle.UF_AddHandle(MessageSystem.UF_GetInstance());
                FrameHandle.UF_AddHandle(UpgradeSystem.UF_GetInstance());
                //FrameHandle.UF_AddHandle(NetworkSystem.UF_GetInstance());
                FrameHandle.UF_AddHandle(AssetSystem.UF_GetInstance());
                FrameHandle.UF_AddHandle(CEntitySystem.UF_GetInstance());
                //FrameHandle.UF_AddHandle(LuaFramework.UF_GetInstance());
                //manager
                FrameHandle.UF_AddHandle(PDataManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(ShaderManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(AudioManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(UIManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(FXManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(NavigateManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(MotionManager.UF_GetInstance());
                //FrameHandle.UF_AddHandle(PerformActionManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(RaycastManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(VoiceManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(RenderPreviewManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(RefObjectManager.UF_GetInstance());
                FrameHandle.UF_AddHandle(CheckPointManager.UF_GetInstance());

                FrameHandle.UF_AddHandle(SimulationManager.Instance);

                //setting
                GTime.FrameRate     = 60;
                GTime.FixedTimeRate = 0.016f;
                GTime.RunDeltaTime  = 0.016f;

                Screen.sleepTimeout = SleepTimeout.NeverSleep;
                VendorSDK.UF_Init();

                //VestBinder.Bind();
            }
            catch (System.Exception e) {
                Debugger.UF_Exception(e);
            }
        }