private void CheckAnswer() { for (int i = 0; i < 9; i++) { if (pieces[i] == null) { return; } if (int.Parse(pieces[i].name) != i) { return; } } Debug.Log("Finish"); leverSwitch.UnlockPazzle(); ClearEightPuzzle(); }
private void CheckAnswer() { for (int i = 0; i < tulipObjects.Length; i++) { if (tulipObjects[i] == null) { Debug.Log(tulipObjects[i]); return; } if (tulipObjects[i].name != answer[i]) { Debug.Log("name : " + tulipObjects[i].name + "ans : " + answer[i]); return; } } //解除処理 Debug.Log("OK"); leverSwitch.UnlockPazzle(); }