void Update() { allBlocks_.Clear(); allBlocks_.AddRange(GameObject.FindGameObjectsWithTag("mino")); allBlocks_.AddRange(GameObject.FindGameObjectsWithTag("floor")); if (isOnBlock()) //落下終了判定条件(nowx、nowyは前回定義済) { foreach (Transform child in transform) { child.gameObject.tag = "mino"; } gameObject.transform.DetachChildren(); //親子関係の解除 Destroy(gameObject); //セットオブジェクト(親)を削除 blockManagerScript_.completeDown(); blockFactory.GetComponent <tetroFactory> ().createBlock(); return; } }