Esempio n. 1
0
    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();
            }
        }
    }
Esempio n. 2
0
 void Awake()
 {
     player     = GameObject.Find("Player").GetComponent <PlayerBehaviour>();
     playerHand = GameObject.Find("PlayerHand").GetComponent <HandBehaviour>();
     handBoard  = playerHand.GetComponent <HandInput>();
 }