Esempio n. 1
0
    public void BackBotton()
    {
        sound = GameObject.Find("Sound");
        mainSound d1 = sound.GetComponent <mainSound> ();

        d1.DontDestroyEnabled = false;

        Destroy(sound);
        SceneManager.LoadScene("Title");
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        sound = GameObject.Find("Sound");
        mainSound d1 = sound.GetComponent <mainSound> ();

        d1.DontDestroyEnabled = false;

        //マップ生成
        for (int i = 0; i < MapSet.stageArray.GetLength(0); i++)
        {
            for (int j = 0; j < MapSet.stageArray.GetLength(1); j++)
            {
                if (MapSet.stageArray [i, j] == 0)
                {
                    Instantiate(cube, new Vector3(i, -1, j), Quaternion.identity);
                }
                else if (MapSet.stageArray[i, j] == 4)
                {
                    Instantiate(town, new Vector3(i, -1, j), Quaternion.identity);
                }
                else if (MapSet.stageArray[i, j] == 2)
                {
                    Instantiate(Lump, new Vector3(i, -1, j), Quaternion.identity);
                }
                else
                {
                    Instantiate(wallBlock, new Vector3(i, 0, j), Quaternion.identity);
                }
            }
        }

        //左下キャラアイコン
        if (charaSerect.player == 1)
        {
            cA.SetActive(true);
            cB.SetActive(false);
            cC.SetActive(false);
        }
        else if (charaSerect.player == 2)
        {
            cA.SetActive(false);
            cB.SetActive(true);
            cC.SetActive(false);
        }
        else
        {
            cA.SetActive(false);
            cB.SetActive(false);
            cC.SetActive(true);
        }

        start.SetActive(true);
    }