diff --git a/Assets/UdonSharp/Location Board/LocationBoard.cs b/Assets/UdonSharp/Location Board/LocationBoard.cs index ef6283f..aea8f01 100644 --- a/Assets/UdonSharp/Location Board/LocationBoard.cs +++ b/Assets/UdonSharp/Location Board/LocationBoard.cs @@ -71,10 +71,12 @@ public class LocationBoard : UdonSharpBehaviour else if (_HasBeenCheckedBefore[Panel - 1]) { _GameManager.AlreadyTried(); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } else { _GameManager.NothingThere(); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } } break; case 1: @@ -110,17 +112,37 @@ public class LocationBoard : UdonSharpBehaviour { _GameManager.AlreadyTried(); } + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } else { _GameManager.NothingThere(); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } } break; case 2: { _OrderIsCorrect[2] = (Panel == CrookLocation); - if (_HasBeenCheckedBefore[Panel - 1]) + if (_OrderIsCorrect[2]) + { + if (!_OrderIsCorrect[1] || !_OrderIsCorrect[0]) + { + _GameManager.OutOfOrder(PanelType.Crook); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 2.5f); + } + } + else if (Panel == LootLocation) + { + _GameManager.OutOfOrder(PanelType.Loot); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 2.5f); + } + else if (Panel == WarrantLocation) + { + _GameManager.OutOfOrder(PanelType.Warrant); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 2.5f); + } + else if (_HasBeenCheckedBefore[Panel - 1]) { if (!_OrderIsCorrect[0] || !_OrderIsCorrect[1]) { @@ -130,10 +152,12 @@ public class LocationBoard : UdonSharpBehaviour { _GameManager.AlreadyTried(); } + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } else { _GameManager.NothingThere(); + SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); } } break; } @@ -152,15 +176,11 @@ public class LocationBoard : UdonSharpBehaviour //else if (Panel == CrookLocation) //{ //} - - if (_OrderIsCorrect[0] && _OrderIsCorrect[1] && _OrderIsCorrect[2]) - { - _GameManager.YoureWinner(); - } } - else + + if (_OrderIsCorrect[0] && _OrderIsCorrect[1] && _OrderIsCorrect[2]) { - SendCustomEventDelayedSeconds(nameof(InitiateBoardReset), 1.0f); + _GameManager.YoureWinner(); } }