コード例 #1
0
 private void Awake()
 {
     animator = GetComponent <Animator>();
     sound    = GetComponent <AudioSource>();
     hand     = FindObjectOfType <PlayerHandMovement>();
     arm      = FindObjectOfType <PlayerArmMovement>();
 }
コード例 #2
0
    //private bool kick;

    private void Awake()
    {
        controller = GetComponent <CharacterController2D>();
        animator   = GetComponent <Animator>();
        hand       = FindObjectOfType <PlayerHandMovement>();
        sound      = GetComponent <AudioSource>();
    }
コード例 #3
0
    void PlayerUpdated(NetworkIdentity localPlayer, int playerNumber)
    {
        if (localPlayer != null)
        {
            PlayerHandMovement player = localPlayer.GetComponent <PlayerHandMovement>();
            if (leftHand && playerNumber == 0)
            {
                player.AssignHand(this.gameObject);
            }
            else if (!leftHand && playerNumber == 1)
            {
                player.AssignHand(this.gameObject);
            }
        }

        this.enabled = (localPlayer != null);
    }
コード例 #4
0
 public void SetNetworkHand(PlayerHandMovement p)
 {
     networkHand = p;
 }
コード例 #5
0
 private void Awake()
 {
     armScript  = hand.GetComponent <PlayerArmMovement>();
     handScript = hand.GetComponent <PlayerHandMovement>();
     sound      = GetComponent <AudioSource>();
 }