diff --git a/Assets/Scenes/PhoneView.unity b/Assets/Scenes/PhoneView.unity index ca999a1..53940a7 100644 --- a/Assets/Scenes/PhoneView.unity +++ b/Assets/Scenes/PhoneView.unity @@ -231,6 +231,9 @@ MonoBehaviour: waitingForPlayersPage: {fileID: 0} roomCodeLabel: {fileID: 0} waitingForPlayersLabels: [] + promptList: {fileID: 0} + explanationPage: {fileID: 0} + counter: {fileID: 0} waitingForPropositionsPage: {fileID: 0} waitingForPropositionsLabels: [] propositionTime: 60 @@ -3334,7 +3337,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1181392806 RectTransform: m_ObjectHideFlags: 0 @@ -3480,16 +3483,6 @@ MonoBehaviour: name: id: creationDate: 0 - currentQuestion: - promptId: - propositions: - photoUrl: - owner: - name: - id: - creationDate: 0 - voters: [] - creationDate: 0 explanationTime: 4 roomCodeField: {fileID: 2023851070} roomError: {fileID: 991600093} @@ -4089,7 +4082,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1383251890 RectTransform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 26eb97b..ce43dd9 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -59,7 +59,10 @@ private void OnApplicationQuit() myOnlineRoom.Child("players").Child(currentPlayer.id).RemoveValueAsync().ContinueWithOnMainThread(task => { Debug.Log($"delete player {currentPlayer.name}"); - myOnlineRoom.ValueChanged -= OnRoomUpdate; + if(myOnlineRoom!= null) + { + myOnlineRoom.ValueChanged -= OnRoomUpdate; + } }); } @@ -88,7 +91,6 @@ public void PlayerValidateNameAndServerRoom(string _name, string _code) nameError.text = "You have to put a valid name"; nameError.gameObject.SetActive(true); - //TODO : MARINE : use the error label to explain to the user that they have forget to put a name return; } @@ -98,7 +100,6 @@ public void PlayerValidateNameAndServerRoom(string _name, string _code) roomError.text = "You have to put a room code"; roomError.gameObject.SetActive(true); - //TODO : MARINE : use the error label to explain to the user that they have forget to put a room code return; } @@ -127,8 +128,10 @@ public void PlayerValidateNameAndServerRoom(string _name, string _code) WaitingRoom.SetActive(true); HomeConnection.SetActive(false); - List list = new List(); - list.Add(currentPlayer); + List list = new List + { + currentPlayer + }; UpdateDisplayedListUser(list) ; });