Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        encountEnemyList = new List <MissionEnemyController>();
#if Develop
        Instantiate(gameManager);
        if (!GameManager.Instance.IsBootInitialized)
        {
            SceneControllManager manager = Instantiate(sceneControllManager);
            manager.LoadBootSceneAndBackScene("MissionScene");
            return;
        }
#endif
        missionStatus = new Dictionary <string, MissionSceneStateBase>
        {
            { MissionState.Start.ToString(), new MissionSceneStartState() },
            { MissionState.Expedition.ToString(), new MissionSceneExpeditionState() },
            { MissionState.Encount.ToString(), new MissionSceneEncountState() },
            { MissionState.Battle.ToString(), new MissionSceneBattleState() },
            { MissionState.Result.ToString(), new MissionSceneResultState() },
            { MissionState.GameOver.ToString(), new MissionSceneGameOverState() },
        };
        foreach (var state in missionStatus)
        {
            state.Value.Initialize();
        }
        currentStageID = SceneControllManager.Instance.loadStageID;
        LoadStage(currentStageID, () =>
        {
            ChangeMissionState(MissionState.Start);
            player.Initialize();
            SceneControllManager.Instance.FadePanel(FadeMode.In);
        });
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
#if Develop
        Instantiate(gameManager);
        if (!GameManager.Instance.IsBootInitialized)
        {
            SceneControllManager manager = Instantiate(sceneControllManager);
            manager.LoadBootSceneAndBackScene("TitleScene");
            return;
        }
#endif
    }