//------------------------------//
        // Constructor					//
        // I for initializing the scene	//
        //------------------------------//
        public SceneManager(ContentManager content)
        {
            // Branches by entering the next scene
            switch (nextScene)
            {
                // Sample scene
                case SCENE_TYPE.SAMPLE_SCENE1:
                    currentScene = new SampleScene1();
                    break;

                // Main menu scene
                case SCENE_TYPE.MAIN_MENU_SCENE:
                    currentScene = new MainMenu();
                    break;

                // Title scene
                case SCENE_TYPE.TITLE_SCENE:
                    currentScene = new TitleScene();
                    break;

                // To the sample if it is not specified
                default:
                    currentScene = new SampleScene1();
                    break;
            }
            nextScene = SCENE_TYPE.NONE;		// Nothing on

            // Save content manager
            this.content = content;
        }
Exemplo n.º 2
0
    public bool CheckTutorialLockSceneType(SCENE_TYPE type)
    {
        switch (type)
        {
        case SCENE_TYPE.SCENE_NONE:
        case SCENE_TYPE.SCENE_TITLE:
        case SCENE_TYPE.SCENE_INTRO:
            return(false);

        default:
            return(true);
        }
    }
Exemplo n.º 3
0
    void StartScene(SCENE_TYPE type)
    {
        if ((Scene)sceneList[type])
        {
            if (currentScene)
            {
                currentScene.Clean();
            }

            currentScene = (Scene)sceneList[type];
            currentScene.Initialize();
        }
    }
Exemplo n.º 4
0
    public static void changeScene(SCENE_TYPE new_scene)
    {
        switch (new_scene)
        {
        case SCENE_TYPE.menu_scene:
            SceneManager.LoadScene(0);
            break;

        case SCENE_TYPE.game_scene:
            SceneManager.LoadScene(1);
            break;

        case SCENE_TYPE.leaderboard_scene:
            SceneManager.LoadScene(2);
            break;

        default:
            break;
        }
    }
Exemplo n.º 5
0
 public static void LoadScene(SCENE_TYPE _scene)
 {
     SceneManager.LoadScene((int)_scene);
 }
        //--------------------------------------//
        // 関数名	CreateScene					//
        //    Function name CreateScene
        // 機能		予約されたシーンを作成		//
        //    Create a scene that has been reserved function
        // 引数		なし							//
        //    No argument
        // 戻り値	なし							//
        //    No return value
        //--------------------------------------//
        public void CreateScene()
        {
            // Delete the current scene
            currentScene = null;

            // Create a scene that is reserved
            switch (nextScene)
            {
                // Sample scene
                case SCENE_TYPE.SAMPLE_SCENE1:
                    currentScene = new SampleScene1();
                    break;

                // Sample Scene 2
                case SCENE_TYPE.MAIN_MENU_SCENE:
                    currentScene = new MainMenu();
                    break;

                case SCENE_TYPE.TITLE_SCENE:
                    currentScene = new TitleScene();
                    break;
            }

            // I to the scene without reservation the following
            nextScene = SCENE_TYPE.NONE;

            // I call the initialization processing of the scene that contains new
            currentScene.Initialize();
            // I call the processing load of the scene that contains new
            currentScene.LoadContent(this.content);
        }
Exemplo n.º 7
0
 public string LockSceneKey(SCENE_TYPE sceneType)
 {
     return(string.Format("SCENE_TYPE_SCENE_{0}", (int)sceneType));
 }