diff --git a/Assets/Scenes/PhoneView.unity b/Assets/Scenes/PhoneView.unity index 297fa45..176abde 100644 --- a/Assets/Scenes/PhoneView.unity +++ b/Assets/Scenes/PhoneView.unity @@ -973,6 +973,7 @@ MonoBehaviour: submitStartGame: {fileID: 638947073} counterExplanation: {fileID: 1383251891} counterMakeProposition: {fileID: 749359387} + counterVote: {fileID: 2103733878} endGameFirstPlayer: {fileID: 847630574} endGameOtherPlayers: {fileID: 1619460475} HomeConnection: {fileID: 2027556831} @@ -5629,7 +5630,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 540, y: -0} + m_AnchoredPosition: {x: 540, y: 0} m_SizeDelta: {x: 340, y: 100} m_Pivot: {x: 0.5, y: 1} --- !u!114 &1545657113 diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index a1c475b..1e80709 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -38,6 +38,9 @@ public class GameManager : MonoBehaviour [Header("MakeProposition Component")] public TextMeshProUGUI counterMakeProposition; + [Header("Vote Component")] + public TextMeshProUGUI counterVote; + [Header("EndGame Components")] [SerializeField] private GameObject endGameFirstPlayer; [SerializeField] private GameObject endGameOtherPlayers; @@ -128,7 +131,7 @@ private void Update() if (myRoom.currentState == (int)GameState.MakeVote && endOfViewDate != DateTime.MinValue) { TimeSpan duration = endOfViewDate - DateTime.Now; - counterMakeProposition.text = ((int)duration.TotalSeconds).ToString("D1"); + counterVote.text = ((int)duration.TotalSeconds).ToString("D1"); if (duration.TotalMilliseconds <= 0) { @@ -387,6 +390,7 @@ private void OnNewGameState() EndGame.SetActive(false); VotePicture.SetActive(true); + endOfViewDate = DateTime.Now.AddSeconds(20); Debug.Log("subscribe to question ID"); myOnlineRoom.Child("currentQuestionId").ValueChanged += OnCurrentQuestionChanged; break; @@ -541,6 +545,7 @@ private void OnCurrentQuestionChanged(object sender, ValueChangedEventArgs onlin { VotePicture.SetActive(true); WaitingOtherPlayers.SetActive(false); + endOfViewDate = DateTime.Now.AddSeconds(20); VotePicture.GetComponent().ShowQuestion(q); } }