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

        if (chat != "")
        {
            FirebaseManager.Instance().ChatMessageSendPublic(chat);
            chatMessageInput.text = "";
        }
    }
示例#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));
     }
 }
示例#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());
     }
 }
示例#6
0
 public void BtnLogout()
 {
     FirebaseManager.Instance().BtnLogout();
 }