private void Start() { if (Client.user != null) { errorPanel.SetActive(ClientInRoom.error >= 0); ClientInRoom.error = -1; welcomeText.spanishText = "¡Bienvenido/a " + Client.user.id + "!"; welcomeText.englishText = "Welcome " + Client.user.id + "!"; welcomeText.UpdateLanguage(); playerAvatar.SetUser(Client.user); playerAvatar.UpdateVisuals(); local = onlyPC.GetComponentInParent <Button>(); onlyPC.gameObject.SetActive(GameManager.isHandheld); local.interactable = !GameManager.isHandheld; } //ClientSignedIn.signedOutEvent += ()=> exitButton.onClick.AddListener(() => ClientSignedIn.TrySignOut()); }
private void Awake() { skins = skinParent.GetComponentsInChildren <Image>(); colors = colorParent.GetComponentsInChildren <Image>(); for (int i = 0; i < skins.Length; i++) { skins[i].color = InicializeAvatarVariables.skinColors[i]; } for (int i = 0; i < colors.Length; i++) { colors[i].color = InicializeAvatarVariables.characterColors[i].colorShirt; } playerAvatar.SetUser(Client.user); playerAvatar.UpdateVisuals(); body1Panel.SetActive(Client.user.avatar_bodyType == 0); body2Panel.SetActive(Client.user.avatar_bodyType == 1); if (Client.state == Client.signedUpState) { next.gameObject.SetActive(true); next.onClick.AddListener(ClientSignedUp.SaveInfo); back.onClick.RemoveListener(ClientSignedIn.SaveInfo); back.gameObject.SetActive(false); } else { back.gameObject.SetActive(true); next.onClick.RemoveListener(ClientSignedUp.SaveInfo); back.onClick.AddListener(ClientSignedIn.SaveInfo); next.gameObject.SetActive(false); } }