Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Awake()
    {
        if (!PhotonNetwork.IsConnected)
        {
            gameObject.SetActive(false);
            return;
        }

        PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners);
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     originalText = text.text;
     PlayerIdentity.CallOnLocalPlayerSet(
         (GameObject playerGO) =>
     {
         localPlayerCC = playerGO.GetComponent <PlayerColorChange>();
         localPlayerD  = playerGO.GetComponent <PlayerDeath>();
         localPlayerD.OnDeath.AddListener(ShowDeathText);
     });
 }
Ejemplo n.º 3
0
    // 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>();
    }
Ejemplo n.º 4
0
 private void Awake()
 {
     PlayerIdentity.CallOnLocalPlayerSet(FollowPlayer);
 }
Ejemplo n.º 5
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners);
 }
Ejemplo n.º 6
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerIdentity.CallOnLocalPlayerSet((GameObject p) => p.GetComponent <PlayerColorChange>().OnPlatStateChange.AddListener(RespondToPlayerColorChange));
 }
Ejemplo n.º 7
0
    // Start is called before the first frame update
    void Start()
    {
        textMesh = GetComponent <TextMeshProUGUI>();

        PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners);
    }
Ejemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     streakText = GetComponent <TextMeshProUGUI>();
     PlayerIdentity.CallOnLocalPlayerSet(initPlayer);
 }