Пример #1
0
    void BossCraft()
    {
        EnemyCountText.text = "ボス:" + "1 / 1";
        bossflag            = true;
        InstantBoss         = Instantiate(Boss);

        switch (SceneManager.GetActiveScene().name)
        {
        case "Stage1":
            gameObject.AddComponent <DogBossTextScript>().Stagenum = 1;
            gameObject.AddComponent <DogBossEventScript>().type    = 1;
            break;

        case "Stage2":
            gameObject.AddComponent <DogBossTextScript>().Stagenum = 2;
            gameObject.AddComponent <DogBossEventScript>().type    = 2;
            break;

        case "Stage3":
            gameObject.AddComponent <DogBossTextScript>().Stagenum = 3;
            gameObject.AddComponent <DogBossEventScript>().type    = 3;
            break;

        case "StageDeath":
            EnemyCountText.text = "ボス:" + "1 / 5";
            gameObject.AddComponent <DogBossTextScript>().Stagenum = 4;
            gameObject.AddComponent <DogBossEventScript>().type    = 4;
            break;
        }
        //BGM Change
        audioScript.BossBattle();
    }