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

        PlayerIdentity.CallOnLocalPlayerSet(AddPlayerListeners);
    }
Beispiel #2
0
 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>();
    }
Beispiel #4
0
 private void Awake()
 {
     PlayerIdentity.CallOnLocalPlayerSet(FollowPlayer);
 }
Beispiel #5
0
 // 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));
 }
Beispiel #7
0
    // Start is called before the first frame update
    void Start()
    {
        textMesh = GetComponent <TextMeshProUGUI>();

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