private void Awake() { animator = GetComponent <Animator>(); sound = GetComponent <AudioSource>(); hand = FindObjectOfType <PlayerHandMovement>(); arm = FindObjectOfType <PlayerArmMovement>(); }
//private bool kick; private void Awake() { controller = GetComponent <CharacterController2D>(); animator = GetComponent <Animator>(); hand = FindObjectOfType <PlayerHandMovement>(); sound = GetComponent <AudioSource>(); }
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); }
public void SetNetworkHand(PlayerHandMovement p) { networkHand = p; }
private void Awake() { armScript = hand.GetComponent <PlayerArmMovement>(); handScript = hand.GetComponent <PlayerHandMovement>(); sound = GetComponent <AudioSource>(); }