void Start()
 {
     anim = GetComponent<Animator>();
     col = GetComponent<CapsuleCollider>();
     throwMechanics = GetComponent<ThrowMechanics> ();
     if(anim.layerCount ==2)
         anim.SetLayerWeight(1, 1);
     audioSource = GetComponent<AudioSource> ();
     npcTakeDamage = GameObject.FindGameObjectWithTag ("npc").GetComponent<NpcTakeDamage> ();
 }
Example #2
0
 void Start()
 {
     anim           = GetComponent <Animator>();
     col            = GetComponent <CapsuleCollider>();
     throwMechanics = GetComponent <ThrowMechanics> ();
     if (anim.layerCount == 2)
     {
         anim.SetLayerWeight(1, 1);
     }
     audioSource   = GetComponent <AudioSource> ();
     npcTakeDamage = GameObject.FindGameObjectWithTag("npc").GetComponent <NpcTakeDamage> ();
 }