diff --git a/Assets/Scripts/Managers/GameManager.cs b/Assets/Scripts/Managers/GameManager.cs index 8aa546b..ee215ab 100644 --- a/Assets/Scripts/Managers/GameManager.cs +++ b/Assets/Scripts/Managers/GameManager.cs @@ -110,10 +110,15 @@ public class GameManager : MonoBehaviour { //Debug.Log("One Move"); foreach (PlayerData player in playerArray) - RunOnce(player); + { + Debug.Log(player.client.Name); + StartCoroutine(RunOnce(player)); + yield return new WaitUntil(() => player.waiting); + } + //wait until all players have finished - yield return new WaitUntil(() => playerArray.All(p => p.waiting)); + //yield return new WaitUntil(() => playerArray.All(p => p.waiting)); gamemode.FinishedMove(playerArray.ToArray()); playerArray.ForEach(p => p.client.SendScore()); diff --git a/Assets/Scripts/UI/Client/LoginUIManager.cs b/Assets/Scripts/UI/Client/LoginUIManager.cs index e8e61ee..16f8701 100644 --- a/Assets/Scripts/UI/Client/LoginUIManager.cs +++ b/Assets/Scripts/UI/Client/LoginUIManager.cs @@ -41,8 +41,8 @@ public class LoginUIManager : MonoBehaviour private string playerAnimal; private Color playerColor; - bool animalSelected = true; - bool colorSelected = true; + bool animalSelected = false; + bool colorSelected = false; #region Unity Functions @@ -130,22 +130,6 @@ public class LoginUIManager : MonoBehaviour } } - public void OnClick_Color(Color playerColor) - { - this.playerColor = playerColor; - } - - public void OnClick_Colour(string hex) - { - Color newColor = new Color(); - if (ColorUtility.TryParseHtmlString(hex, out newColor)){ - this.playerColor = newColor; - colorSelected = true; - } - - clientManager.SendPlayerCDetails(playerColor); - } - public void OnClick_Animal(string playerAnimal) { this.playerAnimal = playerAnimal;