// Start is called before the first frame update void Awake() { if (!PhotonNetwork.IsConnected) { gameObject.SetActive(false); return; } PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners); }
private void Awake() { originalText = text.text; PlayerIdentity.CallOnLocalPlayerSet( (GameObject playerGO) => { localPlayerCC = playerGO.GetComponent <PlayerColorChange>(); localPlayerD = playerGO.GetComponent <PlayerDeath>(); localPlayerD.OnDeath.AddListener(ShowDeathText); }); }
// Start is called before the first frame update void Start() { if (transform.root.CompareTag("Player")) // binds to parent player { playerCombat = GetComponentInParent <PlayerCombat>(); } else //binds to local player { PlayerIdentity.CallOnLocalPlayerSet(InitializePlayerReference); } an = GetComponent <Animator>(); }
private void Awake() { PlayerIdentity.CallOnLocalPlayerSet(FollowPlayer); }
// Start is called before the first frame update void Start() { PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners); }
// Start is called before the first frame update void Start() { PlayerIdentity.CallOnLocalPlayerSet((GameObject p) => p.GetComponent <PlayerColorChange>().OnPlatStateChange.AddListener(RespondToPlayerColorChange)); }
// Start is called before the first frame update void Start() { textMesh = GetComponent <TextMeshProUGUI>(); PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners); }
// Start is called before the first frame update void Start() { streakText = GetComponent <TextMeshProUGUI>(); PlayerIdentity.CallOnLocalPlayerSet(initPlayer); }