private void OnTriggerEnter(Collider other) { HandBehaviour hand = other.GetComponent <HandBehaviour>(); if (hand != null) { handsInside.Add(hand); hand.isDecreasing = false; hand.SetRotation(transform.parent.position); HandAudio handAd = hand.GetComponent <HandAudio>(); if (classCounter[handAd.GetClass()] < maxCounter) { classCounter[handAd.GetClass()]++; handsAudios.Add(handAd); handAd.Play(); } } }
void Awake() { player = GameObject.Find("Player").GetComponent <PlayerBehaviour>(); playerHand = GameObject.Find("PlayerHand").GetComponent <HandBehaviour>(); handBoard = playerHand.GetComponent <HandInput>(); }