private void Awake() { //コンポーネントの取得 GM = this.GetComponent <Game_Manager>(); MA = this.GetComponent <Mino_ArrayAssistant>(); Mino_operation = this.GetComponent <Mino_KeyInput>(); Mino_create = this.GetComponent <Mino_Create>(); Mino_move = this.GetComponent <Mino_Move>(); Mino_moveghost = this.GetComponent <Mino_MoveGhost>(); Mino_rotation = this.GetComponent <Mino_Rotation>(); Mino_hold = this.GetComponent <Mino_Hold>(); Dbgcode = this.GetComponent <Mino_DebugCode>(); audioSource = this.GetComponent <AudioSource>(); //初期設定 Mino = new MINOs_Array(0, new int[MINOSIZE, MINOSIZE], new GameObject[4], new GameObject[4]); MINO = (GameObject)Resources.Load("Prefabs/MINO"); MINOs = Instantiate(MINO, MINO.transform.position, Quaternion.identity); GHOSTMINOs = Instantiate(MINO, MINO.transform.position, Quaternion.identity); GHOSTMINOs.name = ("GHOSTMINOs"); NowColorObj = (GameObject)Resources.Load("Prefabs/MINO_I"); //UseMinoGhost配列の初期設定 for (int i = 0; i < Mino.UseMinoGhost.Length; i++) { Mino.UseMinoGhost[i] = Instantiate(NowColorObj, MINOs.transform.position, Quaternion.identity, GHOSTMINOs.transform); } }
/// <summary> /// ミノ(ゲームオブジェクト)とミノ配列(NowMino配列)の作成指示処理 /// </summary> public void Minos_Creating() { //初期化 m_Yheight = 0; m_XSidePos = POINTER; m_MinoholdOnce = true; m_AutoMove = false; m_KeyInput = false; //ミノの作成 Array.Clear(Mino.NowMino, 0, Mino.NowMino.Length); Mino = Mino_create.MinoSelect(Mino, ref ColorBlock, ref NowColorObj, m_DebugMino); Mino = Mino_create.MinoCreate(Mino, MINOs, GHOSTMINOs, NowColorObj); //ミノが生成時に被っていないかチェックし、異常がない場合配列に格納 MA.Array_Comparison(Mino.NowMino, ref Stage, ref m_Yheight, ref m_XSidePos, m_SaveYheight, m_SaveXSidePos); //デバックフラグの初期化 m_DebugMino = false; //初期化処理 Invoke("Play_Start", WAITING_TIME); }