コード例 #1
0
    void Awake()
    {
        curScene = SceneManager.GetActiveScene().buildIndex;

        if (curScene == 0)
        {
            introManager = GetComponent <IntroScene.IntroManager>();
        }
        else if (curScene == 1)
        {
            gameManager = GetComponent <GameScene.GameManager>();
        }

        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        CardboardMagnetSensor.SetEnabled(true);
    }
コード例 #2
0
ファイル: GameManager.cs プロジェクト: Cube219/BlockBuster
        void Awake()
        {
            m = this;
            // Update 델리게이트 설정
            updateDelegates = new UpdateDelegate[(int)GameState.Count];
            updateDelegates[(int)GameState.FirstStart] = UpdateGameFirstStart;
            updateDelegates[(int)GameState.Load] = UpdateGameLoad;
            updateDelegates[(int)GameState.LateLoad] = UpdateGameLateLoad;
            updateDelegates[(int)GameState.Ready] = UpdateGameReady;
            updateDelegates[(int)GameState.Run] = UpdateGameRun;
            updateDelegates[(int)GameState.Respawn] = UpdateGameRespawn;
            updateDelegates[(int)GameState.GameOver] = UpdateGameGameOver;
            updateDelegates[(int)GameState.Pause] = UpdateGamePause;

            // 로그인 되어 있으면 OFFLINE Text 지워줌
            if(UserManager.userState == UserManager.State.Login)
                DestroyOffline();

            gameStage = 1;
            gameState = GameState.FirstStart;
        }