private IEnumerator WaitForTankSetupInSceneByAccountId(string accountID, GameObject newRosterObject) { TankSetup tankSetup = null; while (tankSetup == null) { yield return(new WaitForSeconds((float)0.1)); tankSetup = VivoxTankHelper.FindTankSetupInSceneByAccountId(accountID); } tankSetup.m_RosterItem = newRosterObject; newRosterObject.GetComponent <RectTransform>().sizeDelta = new Vector2(250, 100); var rosterItemText = newRosterObject.GetComponentInChildren <Text>(); rosterItemText.text = tankSetup.m_PlayerDisplayName; rosterItemText.color = Color.white; rosterItemText.fontSize = 32; newRosterObject.GetComponent <RosterItem>().ChatStateImage.GetComponent <Image>().color = Color.white; var backgroundColor = newRosterObject.GetComponent <Image>(); var bgColor = tankSetup.m_TeamID == TeamColor.Blue ? Color.blue : Color.red; bgColor.a = 0.25f; backgroundColor.color = bgColor; }
private IEnumerator FindAndSetupTankParticipant(IParticipant participant) { yield return(new WaitUntil(() => VivoxTankHelper.FindTankSetupInSceneByAccountId(participant.Account.Name) != null)); var tankToSetParticipant = VivoxTankHelper.FindTankSetupInSceneByAccountId(participant.Account.Name); tankToSetParticipant.SetupParticipantPositionalVoice(participant); }