From cf64a7cfc7b770ba7ff4ea7b509093d56daeb744 Mon Sep 17 00:00:00 2001 From: Steven Leal Date: Thu, 30 Nov 2017 13:55:45 -0600 Subject: [PATCH] added timeout after game win --- .../Assets/Scripts/Lobby/WinAnimationController.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Project Undercover/Assets/Scripts/Lobby/WinAnimationController.cs b/Project Undercover/Assets/Scripts/Lobby/WinAnimationController.cs index e0d25e5..3ce93ae 100644 --- a/Project Undercover/Assets/Scripts/Lobby/WinAnimationController.cs +++ b/Project Undercover/Assets/Scripts/Lobby/WinAnimationController.cs @@ -112,6 +112,7 @@ public class WinAnimationController : MonoBehaviour { // Reveal Win Text yield return StartCoroutine(RevealWinText(1)); + StartCoroutine(LeaveRoom()); yield return null; } @@ -178,4 +179,10 @@ public class WinAnimationController : MonoBehaviour { _winText.color = new Color(1, 1, 1, limit); yield return null; } + + IEnumerator LeaveRoom() + { + yield return new WaitForSeconds(7.0f); + GameManager.ActiveManager.LeaveRoom(); + } }