Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     PlayerHandCollider[] hand_colliders = this.GetComponentsInChildren <PlayerHandCollider> ();
     for (int i = 0; i < hand_colliders.Length; i++)
     {
         if (hand_colliders [i].player_hand_placement == PlayerHandCollider.PlayerHandPlacement.FRONT)
         {
             front_hand = hand_colliders [i];
         }
         if (hand_colliders [i].player_hand_placement == PlayerHandCollider.PlayerHandPlacement.BACK)
         {
             back_hand = hand_colliders [i];
         }
     }
     animator = this.GetComponent <Animator> ();
     psm      = this.GetComponent <PlayerSoundManager> ();
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        pmm           = this.GetComponent <PlayerMovementManager> ();
        pam           = this.GetComponentInChildren <PlayerAnimationManager> ();
        p_score_m     = this.GetComponent <PlayerScoreManager> ();
        p_sound_m     = this.GetComponentInChildren <PlayerSoundManager> ();
        grav_collider = this.GetComponent <BoxCollider> ();

        PlayerHandCollider[] hand_colliders = this.GetComponentsInChildren <PlayerHandCollider> ();
        for (int i = 0; i < hand_colliders.Length; i++)
        {
            if (hand_colliders [i].player_hand_placement == PlayerHandCollider.PlayerHandPlacement.FRONT)
            {
                front_hand = hand_colliders [i];
            }
            if (hand_colliders [i].player_hand_placement == PlayerHandCollider.PlayerHandPlacement.BACK)
            {
                back_hand = hand_colliders [i];
            }
        }
        animator = this.GetComponentInChildren <Animator> ();
        Debug.Log(animator);
    }