counter while vote phone
This commit is contained in:
parent
8a609ff22f
commit
1158270ca6
@ -973,6 +973,7 @@ MonoBehaviour:
|
|||||||
submitStartGame: {fileID: 638947073}
|
submitStartGame: {fileID: 638947073}
|
||||||
counterExplanation: {fileID: 1383251891}
|
counterExplanation: {fileID: 1383251891}
|
||||||
counterMakeProposition: {fileID: 749359387}
|
counterMakeProposition: {fileID: 749359387}
|
||||||
|
counterVote: {fileID: 2103733878}
|
||||||
endGameFirstPlayer: {fileID: 847630574}
|
endGameFirstPlayer: {fileID: 847630574}
|
||||||
endGameOtherPlayers: {fileID: 1619460475}
|
endGameOtherPlayers: {fileID: 1619460475}
|
||||||
HomeConnection: {fileID: 2027556831}
|
HomeConnection: {fileID: 2027556831}
|
||||||
@ -5629,7 +5630,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {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_SizeDelta: {x: 340, y: 100}
|
||||||
m_Pivot: {x: 0.5, y: 1}
|
m_Pivot: {x: 0.5, y: 1}
|
||||||
--- !u!114 &1545657113
|
--- !u!114 &1545657113
|
||||||
|
@ -38,6 +38,9 @@ public class GameManager : MonoBehaviour
|
|||||||
[Header("MakeProposition Component")]
|
[Header("MakeProposition Component")]
|
||||||
public TextMeshProUGUI counterMakeProposition;
|
public TextMeshProUGUI counterMakeProposition;
|
||||||
|
|
||||||
|
[Header("Vote Component")]
|
||||||
|
public TextMeshProUGUI counterVote;
|
||||||
|
|
||||||
[Header("EndGame Components")]
|
[Header("EndGame Components")]
|
||||||
[SerializeField] private GameObject endGameFirstPlayer;
|
[SerializeField] private GameObject endGameFirstPlayer;
|
||||||
[SerializeField] private GameObject endGameOtherPlayers;
|
[SerializeField] private GameObject endGameOtherPlayers;
|
||||||
@ -128,7 +131,7 @@ private void Update()
|
|||||||
if (myRoom.currentState == (int)GameState.MakeVote && endOfViewDate != DateTime.MinValue)
|
if (myRoom.currentState == (int)GameState.MakeVote && endOfViewDate != DateTime.MinValue)
|
||||||
{
|
{
|
||||||
TimeSpan duration = endOfViewDate - DateTime.Now;
|
TimeSpan duration = endOfViewDate - DateTime.Now;
|
||||||
counterMakeProposition.text = ((int)duration.TotalSeconds).ToString("D1");
|
counterVote.text = ((int)duration.TotalSeconds).ToString("D1");
|
||||||
|
|
||||||
if (duration.TotalMilliseconds <= 0)
|
if (duration.TotalMilliseconds <= 0)
|
||||||
{
|
{
|
||||||
@ -387,6 +390,7 @@ private void OnNewGameState()
|
|||||||
EndGame.SetActive(false);
|
EndGame.SetActive(false);
|
||||||
|
|
||||||
VotePicture.SetActive(true);
|
VotePicture.SetActive(true);
|
||||||
|
endOfViewDate = DateTime.Now.AddSeconds(20);
|
||||||
Debug.Log("subscribe to question ID");
|
Debug.Log("subscribe to question ID");
|
||||||
myOnlineRoom.Child("currentQuestionId").ValueChanged += OnCurrentQuestionChanged;
|
myOnlineRoom.Child("currentQuestionId").ValueChanged += OnCurrentQuestionChanged;
|
||||||
break;
|
break;
|
||||||
@ -541,6 +545,7 @@ private void OnCurrentQuestionChanged(object sender, ValueChangedEventArgs onlin
|
|||||||
{
|
{
|
||||||
VotePicture.SetActive(true);
|
VotePicture.SetActive(true);
|
||||||
WaitingOtherPlayers.SetActive(false);
|
WaitingOtherPlayers.SetActive(false);
|
||||||
|
endOfViewDate = DateTime.Now.AddSeconds(20);
|
||||||
VotePicture.GetComponent<PropositionHandler>().ShowQuestion(q);
|
VotePicture.GetComponent<PropositionHandler>().ShowQuestion(q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user