Exemplo n.º 1
0
 //called in from wherever a netChat message is received, giving network ID of player to display bubble over
 public static void DisplayChat(NetworkViewID ID)
 {
     for (int i = 0; i < Instance.m_nvs.players.Count; i++)
     {
         PlayerInfo player = (PlayerInfo)Instance.m_nvs.players[i];
         if (player != null)
         {
             if (player.ballViewID == ID)
             {
                 Instance.StartCoroutine(Instance.Display(Instance.m_chatBubbles[player], 1.0f));
                 break;
             }
         }
     }
 }
 //called in from wherever a netChat message is received, giving network ID of player to display bubble over
 public static void DisplayChat(NetworkViewID ID)
 {
     //Debug.Log("Passed ID: " + ID);
     for (int i = 0; i < Instance.m_nvs.players.Count; i++)
     {
         PlayerInfo player = (PlayerInfo)Instance.m_nvs.players[i];
         if (player != null)
         {
             //Debug.Log("My ID: " + player.ballViewID);
             if (player.ballViewID == ID)
             {
                 if (Instance.m_chatBubbles.ContainsKey(player))
                 {
                     Instance.StartCoroutine(Instance.Display(Instance.m_chatBubbles[player], 1.0f));
                     break;
                 }
             }
         }
     }
 }
Exemplo n.º 3
0
    void DisplayText(string text, float displayLength)
    {
        bubble.gameObject.SetActive(true);

        bubble.Display(displayLength, text);
    }