Exemple #1
0
    //We must keep this is run firstly.
    void Awake()
    {
        ConsoleEx.DebugLog("*************** InitializedFirstly ***************", ConsoleEx.YELLOW);

        if (Core.SM != null && Core.SM.isReLogin)
        {
            Destroy(gameObject);
            return;
        }

        #region Global Define
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
                #if UNITY_EDITOR
        Application.targetFrameRate = 60;
                #else
        Application.targetFrameRate = 35;
                #endif

        DontDestroyOnLoad(this);
        #endregion

        self    = this;
        Core.SM = new StateMachine();
        Core.SM.onGameLaunched();

        #region Add by jc
        if (!SQYAlertViewMove.initialized)
        {
            SQYAlertViewMove.Initialize();
        }
        #endregion

                #if InMobi
        InMobi();
                #endif
    }