// Use this for initialization void Awake() { score = 0; //配列の初期化 for (int i = 0; i < board.GetLength(0); i++) { for (int j = 0; j < board.GetLength(1); j++) { board[i, j] = -1; board_num[i, j] = -1; } } //初期用配列設定 board[0, 0] = maxDiceId; board_num[0, 0] = 1; DiceBase = (GameObject)Resources.Load("Dice"); Dice = GameObject.Find("Dice"); dices.Add(Dice); //リストにオブジェクトを追加 Aqui = GameObject.Find("Aqui"); objAquiController = Aqui.GetComponent <AquiController>(); objDiceController = Dice.GetComponent <DiceController>(); if (gameType == 3) { board[0, 0] = -1; board_num[0, 0] = -1; maxDiceId = 0; dices.Clear(); Destroy(Dice); } StatusText = GameObject.Find("StatusText"); objStatusText = StatusText.GetComponent <StatusTextController>(); ScreenText = GameObject.Find("ScreenText"); objScreenText = ScreenText.GetComponent <ScreenTextController>(); gobjOGController = GameObject.Find("OnlineGameController"); //BGM if (gameType != 2) { BgmManager.Instance.Play((stage + 1).ToString()); //BGM } else { BgmManager.Instance.Play("tutorial"); //BGM } //AudioSourceコンポーネントを取得し、変数に格納 AudioSource[] audioSources = GetComponents <AudioSource>(); sound_one = audioSources[0]; sound_levelup = audioSources[1]; sound_vanish = audioSources[2]; }