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

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

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