IEnumerator sc() { while (!FirebaseManager.Instance().writeUserComplete) { yield return(new WaitForSeconds(0.1f)); } SceneManager.LoadScene("ChatingScene"); }
IEnumerator LoadLoginAsyn() { while (!FirebaseManager.Instance().newUserSet) { yield return(new WaitForSeconds(0.5f)); } SceneManager.LoadScene("Login"); }
public void BtnSendChatMessage() { string chat = chatMessageInput.text.ToString().Trim(); if (chat != "") { FirebaseManager.Instance().ChatMessageSendPublic(chat); chatMessageInput.text = ""; } }
IEnumerator ListenChatApply() { while (true) { if (FirebaseManager.Instance().MessageList.Count > ChatCount) { PublicChat.AddChat(FirebaseManager.Instance().MessageList[ChatCount]); ChatCount++; } yield return(new WaitForSeconds(0.2f)); } }
public void BtnEnter() { if (inputPlayerName.text.ToString().Trim() == "") { Debug.Log("Types Name"); return; // no input } else { FirebaseManager.Instance().WriteNewUser(inputPlayerName.text.ToString().Trim(), newPlayer, newName); StartCoroutine(sc()); } }
public void BtnLogout() { FirebaseManager.Instance().BtnLogout(); }