private void UpdateTextMessage(int playerId, string text) { //Unlike the others, we do display our own text messages, but it is handled differently if (playerId == _myPlayerId) { GameObject.FindGameObjectWithTag("Player").GetComponent <DialogController>().Speak(text, 5.0f); return; } //If this is an existing player, update their stats foreach (GameObject go in _players) { VirtualPlayer player = go.GetComponent <VirtualPlayer>(); if (player.Id == playerId) { player.UpdateText(text); return; } } }