コード例 #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
ファイル: PlayerCamera.cs プロジェクト: DrFrolicks/NEON-GRAVY
 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);
 }