Exemplo n.º 1
0
    private void Start()
    {
        isStartGame   = false;
        stageModeType = Common.stageModeType;
        MonsterCount  = 0;
        isEndGame     = false;
        kPoint        = 0;
        dPoint        = 0;
        userInfo      = new UserInfo();
        userInfo.initUserInfo();
        stageInfo = GameManagement.instance.GetStageInfo();
        stageInfo.initStage();
        if (stageModeType == Common.StageModeType.Main)
        {
            Map map = MapSystem.GetMap(stageInfo.mapNumber);
            SoundManager.instance.BgmSourceChange(AudioClipManager.instance.StageBgm);
            switch (map.stageType)
            {
            case 0:
                UI_Manager.instance.Title.GetComponentInChildren <Text>().text = LocalizationManager.GetText("stageTitleMainType1");
                InitCastle();
                break;

            case 1:
                UI_Manager.instance.Title.GetComponentInChildren <Text>().text = LocalizationManager.GetText("stageTitleMainType2");
                break;

            case 2:
                UI_Manager.instance.Title.GetComponentInChildren <Text>().text = LocalizationManager.GetText("stageTitleMainType3");
                InitBoss();
                break;
            }
            mapnameText.text = map.name;
            if (Map != null)
            {
                MapSystem.SetMapSprite(stageInfo.stageNumber, ref Map);
            }
        }
        else if (stageModeType == Common.StageModeType.Infinite)
        {
            SoundManager.instance.BgmSourceChange(AudioClipManager.instance.StageBgm);
            UI_Manager.instance.Title.GetComponentInChildren <Text>().text = LocalizationManager.GetText("stageTitleInfinity");
        }

        CharactersManager.instance.SetStagePositionHeros();
        StartCoroutine("StageStartEffect");
    }