public void Init(BombermanNetworkPlayer networkPlayer) { m_networkPlayer = networkPlayer; m_networkPlayer.syncVarsChanged += OnSyncVarsChanged; readyButton.image.color = notReadyColor; MenuUI.Instance.playerList.AddPlayer(this); if (!m_networkPlayer.hasAuthority) { nameInput.interactable = false; readyButton.interactable = false; } else { nameInput.onEndEdit.AddListener(OnNameChanged); readyButton.onClick.AddListener(OnReadyClick); } }
private void OnSyncVarsChanged(BombermanNetworkPlayer player) { UpdateValues(); }