WIP restart same players
This commit is contained in:
parent
e402e01ec4
commit
723edde647
@ -49,6 +49,7 @@ public void WebcamResume()
|
||||
|
||||
wTexture.Play();
|
||||
photo = null;
|
||||
photoBox.texture = null;
|
||||
freezeButton.gameObject.SetActive(true);
|
||||
resumeButton.gameObject.SetActive(false);
|
||||
}
|
||||
|
@ -341,20 +341,13 @@ private void OnNewGameState()
|
||||
{
|
||||
case (int)GameState.EnteringName:
|
||||
{
|
||||
if (EndGame.activeInHierarchy)
|
||||
{
|
||||
EndGame.SetActive(false);
|
||||
HomeConnection.SetActive(true);
|
||||
}
|
||||
|
||||
EndGame.SetActive(false);
|
||||
HomeConnection.SetActive(true);
|
||||
break;
|
||||
}
|
||||
case (int)GameState.Explanation:
|
||||
{
|
||||
if (EndGame.activeInHierarchy)
|
||||
{
|
||||
EndGame.SetActive(false);
|
||||
}
|
||||
EndGame.SetActive(false);
|
||||
WaitingRoom.SetActive(false);
|
||||
BeforeStart.SetActive(true);
|
||||
endOfViewDate = DateTime.Now.AddSeconds(4);
|
||||
@ -473,10 +466,11 @@ public void OnClickSubmitSignIn()
|
||||
|
||||
public void onClickSamePlayers()
|
||||
{
|
||||
myRoom.currentState = (int)GameState.Explanation;
|
||||
myRoom.questions = null;
|
||||
myRoom.currentQuestionId = 0;
|
||||
string json = JsonConvert.SerializeObject(myRoom);
|
||||
Room newRoom = myRoom;
|
||||
newRoom.currentState = (int)GameState.Explanation;
|
||||
newRoom.questions.Clear();
|
||||
newRoom.currentQuestionId = 0;
|
||||
string json = JsonConvert.SerializeObject(newRoom);
|
||||
|
||||
myOnlineRoom.SetRawJsonValueAsync(json).ContinueWithOnMainThread(task =>
|
||||
{
|
||||
|
@ -6,12 +6,9 @@
|
||||
using UnityEngine;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
using Google.MiniJSON;
|
||||
using Firebase.Storage;
|
||||
using System.Security.Policy;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
public class RoomManager : MonoBehaviour
|
||||
{
|
||||
@ -138,7 +135,6 @@ private void Initialize()
|
||||
/// <summary>
|
||||
/// Check all the rooms in the server and give back the number already taken
|
||||
/// </summary>
|
||||
|
||||
private void WhichCodesAreAlreadyUsed(Action<List<int>> callback_OnCodesChecked)
|
||||
{
|
||||
QueryRoomsInDatabase(onlineRooms =>
|
||||
@ -288,6 +284,7 @@ private void OnNewGameStateStarted()
|
||||
|
||||
case (int)GameState.Explanation:
|
||||
Debug.Log("New State : Explanation");
|
||||
scoringPage.gameObject.SetActive(false); //if we come back from a new game
|
||||
waitingForPlayersPage.SetActive(false);
|
||||
explanationPage.SetActive(true);
|
||||
endOfExplanationDate = DateTime.Now.AddSeconds(explanationTime);
|
||||
|
Loading…
Reference in New Issue
Block a user