Exemple #1
0
 IEnumerator sc()
 {
     while (!FirebaseManager.Instance().writeUserComplete)
     {
         yield return(new WaitForSeconds(0.1f));
     }
     SceneManager.LoadScene("ChatingScene");
 }
Exemple #2
0
 IEnumerator LoadLoginAsyn()
 {
     while (!FirebaseManager.Instance().newUserSet)
     {
         yield return(new WaitForSeconds(0.5f));
     }
     SceneManager.LoadScene("Login");
 }
Exemple #3
0
    public void BtnSendChatMessage()
    {
        string chat = chatMessageInput.text.ToString().Trim();

        if (chat != "")
        {
            FirebaseManager.Instance().ChatMessageSendPublic(chat);
            chatMessageInput.text = "";
        }
    }
Exemple #4
0
 IEnumerator ListenChatApply()
 {
     while (true)
     {
         if (FirebaseManager.Instance().MessageList.Count > ChatCount)
         {
             PublicChat.AddChat(FirebaseManager.Instance().MessageList[ChatCount]);
             ChatCount++;
         }
         yield return(new WaitForSeconds(0.2f));
     }
 }
Exemple #5
0
 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());
     }
 }
Exemple #6
0
 public void BtnLogout()
 {
     FirebaseManager.Instance().BtnLogout();
 }