Compare commits

..

No commits in common. "91d0710ce9373ce2440bd62a0e81fbaac3ee4d8c" and "f585b53f4f474798cf325ba5fb0d7e7c31dba288" have entirely different histories.

3 changed files with 18 additions and 17 deletions

View File

@ -303,22 +303,24 @@ private void OnRoomUpdate(object sender, ValueChangedEventArgs e)
return;
}
if (myRoom.currentState != (int)lastState)
if(myRoom.currentState != (int)lastState)
{
OnNewGameState();
}
//call this every time we are on this state
switch (myRoom.currentState)
else
{
case (int)GameState.WaitingForOtherPlayersToJoin:
{
CheckIfIAmTheFirst(myRoom.GetPlayerList());
UpdateDisplayedListUser(myRoom.GetPlayerList());
//call this every time we are on this state
switch (myRoom.currentState)
{
case (int)GameState.WaitingForOtherPlayersToJoin:
{
CheckIfIAmTheFirst(myRoom.GetPlayerList());
UpdateDisplayedListUser(myRoom.GetPlayerList());
break;
}
default:
break;
}
default:
break;
}
}
}
@ -399,7 +401,7 @@ public void WaitForPlayers()
{
TakePicture.SetActive(false);
}
if (VotePicture.activeInHierarchy)
if(VotePicture.activeInHierarchy)
{
VotePicture.SetActive(false);
}
@ -522,7 +524,7 @@ public void OnClickProposition(int propositionNumber)
*/
List<string> voters = myRoom.questions[myRoom.currentQuestionId].propositions[propositionNumber].voters;
if (voters == null)
if(voters == null)
voters = new List<string>();
voters.Add(currentPlayer.id);

View File

@ -31,7 +31,7 @@ void OnDisable()
void Redraw(int currentQuestion)
{
Prompt prompt = promptList.prompts.Find(x => x.id == player2questions[currentQuestion].promptId);
//Debug.Log(JsonUtility.ToJson(prompt));
Debug.Log(JsonUtility.ToJson(prompt));
explainText.SetText(prompt.en);
CameraManager cameraManager = gameObject.GetComponent<CameraManager>();
@ -52,8 +52,7 @@ public void OnSubmitButton()
gameManager.myRoom.code,
gameManager.currentPlayer.id,
currentQuestion,
GetPropRef(gameManager.currentPlayer),
succeed =>
GetPropRef(gameManager.currentPlayer), succeed =>
{
if(!succeed)
{

View File

@ -49,7 +49,7 @@ public void UploadPhoto(string roomCode, string playerId, int question, int prop
string path = $"{roomCode}/{playerId}/{imageUuid}.png";
StorageReference imageRef = storage.Child(path);
imageRef.PutBytesAsync(photoBytes).ContinueWithOnMainThread(task =>
imageRef.PutBytesAsync(photoBytes).ContinueWith((Task<StorageMetadata> task) =>
{
if (task.IsFaulted || task.IsCanceled)
{