Exemple #1
0
    public static void Start()
    {
#if UNITY_EDITOR
        YSProfiler.Regester();
#endif
        //Common.UDebug.enabled = true;
        //Common.UDebug.LogError("GameStart Start");
        Utility_Profiler.BeginSample(" Common.Root.Initialize()");
        Common.Root.Initialize();
        Utility_Profiler.EndSample();

        Utility_Profiler.BeginSample("   UIManager.Instance.Initalize()");
        UIManager.Instance.Initalize();
        Utility_Profiler.EndSample();

        NetMgr.srvConn.proto = new ProtocolBytes();
        NetMgr.srvConn.Connect("127.0.0.1", 1234);

        UIManager.Instance.OpenUI(EUIName.AccountUI);
        if (clientProxy == null)
        {
            GameObject go = new GameObject("[ClientProxy]");
            clientProxy = go.GetOrAddComponent <ClientProxy> ();
        }
        else if (UpdateSystem.UpdateCenter.bRestart)
        {
            UpdateSystem.UpdateCenter.bRestart = false;
            clientProxy.ChangeState(GameStateEnum.GameStateEnum_Resert);
        }
    }
Exemple #2
0
    IEnumerator StartClientProxy()
    {
        Debug.Log("StartClientProxy is Start");
        yield return(defaultWaitForEndOfFrame);

        Utility_Profiler.BeginSample("TextManager.Instance.Initalize()");
        TextManager.Instance.Initalize();
        Utility_Profiler.EndSample();
        Utility_Profiler.BeginSample(" SinglePanelManger.Instance.Initalize()");
        SinglePanelManger.Instance.Initalize();
        Utility_Profiler.EndSample();
        Debug.Log("StartClientProxy is Finish");
    }
Exemple #3
0
    private void LateUpdate()
    {
        Utility_Profiler.BeginSample("ClientProxy LateUpdate Start");
        if (m_gameState != null)
        {
            m_gameState.LateUpdate(Time.deltaTime);
        }

        if (m_LateGameStateEnum != GameStateEnum.GameStateEnum_None)
        {
            LateChangeState(m_LateGameStateEnum);
            m_LateGameStateEnum = GameStateEnum.GameStateEnum_None;
        }
        Utility_Profiler.EndSample();
    }
Exemple #4
0
    private void Awake()
    {
        transform.SetParent(Common.Root.root);


        Application.backgroundLoadingPriority = UnityEngine.ThreadPriority.High;
        Application.runInBackground           = true;
        Application.targetFrameRate           = 60;
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        m_Instance = this;



        Utility_Profiler.BeginSample("ClientProxy.Initalize()");
        Initalize();
        Utility_Profiler.EndSample();


        EnterGame();
        Common.Root.coro.StartCoroutine(StartClientProxy());
    }