From b506c8f4522276e22998acdd9ab9c9b62771f7b8 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Fri, 11 Mar 2022 13:24:24 -0500 Subject: [PATCH] de-hardcode conditional --- .../Scripts/Games/DrummingPractice/DrummingPractice.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs index 265a243a6..ec2623b30 100644 --- a/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs +++ b/Assets/Scripts/Games/DrummingPractice/DrummingPractice.cs @@ -44,7 +44,7 @@ namespace RhythmHeavenMania.Games.DrummingPractice // TODO: Move this to OnGameSwitch() when functional? private void Start() { - SetMiis(UnityEngine.Random.Range(0, player.miiFaces.Count)); + SetMiis(); } private void Update() @@ -97,9 +97,9 @@ namespace RhythmHeavenMania.Games.DrummingPractice rightDrummer.SetFace(type); } - public void SetMiis(int playerFace, int leftFace = -1, int rightFace = -1, bool all = false) + public void SetMiis(int playerFace = (int) MiiType.Random, int leftFace = (int) MiiType.Random, int rightFace = (int) MiiType.Random, bool all = false) { - if (playerFace == -1) + if (playerFace == (int) MiiType.Random) { do { @@ -117,7 +117,7 @@ namespace RhythmHeavenMania.Games.DrummingPractice } else { - if (leftFace == -1) + if (leftFace == (int) MiiType.Random) { do { @@ -128,7 +128,7 @@ namespace RhythmHeavenMania.Games.DrummingPractice else leftDrummer.mii = leftFace; - if (rightFace == -1) + if (rightFace == (int) MiiType.Random) { do {