Example #1
0
    void NextStage()
    {
        BossTime     = false;
        MonsterCount = 0;

        StageN++;

        if (StageN == 21)
        {
            Victory();
            return;
        }

        DifficultyManager.GetComponent <DifficultyManager>().DecRecovery();                          //난이도 상승.

        FloorUI.text = StageN.ToString();
        FloorUI.GetComponent <Animation>().Play();
        int StageNDiv = StageN % 20;

        switch (StageNDiv)
        {
        case 1:
            ColorChanger.SendMessage("ColorChange", 1);
            BGObject.SendMessage("ImageChange");
            break;

        case 4:
            ColorChanger.SendMessage("ColorChange", 2);
            BGObject.SendMessage("ImageChange");
            break;

        case 7:
            ColorChanger.SendMessage("ColorChange", 3);
            BGObject.SendMessage("ImageChange");
            break;

        case 10:
            ColorChanger.SendMessage("ColorChange", 4);
            BGObject.SendMessage("ImageChange");
            break;

        case 13:
            ColorChanger.SendMessage("ColorChange", 5);
            BGObject.SendMessage("ImageChange");
            break;

        case 16:
            ColorChanger.SendMessage("ColorChange", 6);
            BGObject.SendMessage("ImageChange");
            break;
        }

        if (StageN % 4 == 0)//특수노트 빈도증가
        {
            DifficultyManager.SendMessage("IncNoteFreq", 1);
        }
    }
    void MonsterSpawn()
    {
        ColorChanger.SendMessage("ColorChange", Random.Range(1, 3));

        int i = Random.Range(0, MonsterPrefabs.Length);

        if (BossTime)
        {
            MonsterObject = Instantiate(BossMonsterPrefab);
        }
        else
        {
            MonsterObject = Instantiate(MonsterPrefabs[i]);
        }
        MonsterObject.SendMessage("SetStageManager");                                       //몬스터 스크립트가 먼저 로드되기때문에 여기서 스테이지 설정
        PlayerObject.SendMessage("SetAttackAble", true);
    }
Example #3
0
 void Start()
 {
     ColorChanger.SendMessage("ColorChange", 1);
     MenuSelect();
 }