private void Start() { _cameraTransform = Camera.main.transform; _gameManager = FindObjectOfType <GameManager>(); _jidoManager = FindObjectOfType <Jido_Manager> (); Health = MaxHealth; //Set the name of this player game object using netId playerID = GetComponent <NetworkIdentity>().netId.ToString(); name = playerID; if (!isLocalPlayer) { _jidoManager.AddNonLocalPlayer(gameObject); ModelController.ShieldVisuals.tag = "Untagged";//This is only on the non local player so it doesn't allow lasers to pass through it } else { _localHealthBar = _gameManager.LocalPlayerHealthBar; _gameManager.ShieldButton.onClick.AddListener(ShieldButtonPressed); _jidoManager.AddLocalPlayer(gameObject); } }
void Start() { //Set the name of this player game object using netId playerID = GetComponent <NetworkIdentity>().netId.ToString(); name = playerID; //Add this player game object to the list of players in SceneControl _jidoManager = FindObjectOfType <Jido_Manager>(); if (!isLocalPlayer) { _jidoManager.AddNonLocalPlayer(gameObject); } else { _jidoManager.AddLocalPlayer(gameObject); } }