Inheritance: MonoBehaviour
Beispiel #1
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.CompareTag("Player"))
     {
         GearGuyCtrl1 gearguy = col.gameObject.GetComponent <GearGuyCtrl1> ();
         if (gearguy.gearChildren.Count > 0 && !activated)
         {
             GameObject droppedPickup = gearguy.gearChildren.Pop();
             gearDropMat.material = droppedPickup.GetComponent <MeshRenderer> ().material;
             GameObject.Destroy(droppedPickup);
             activated = true;
         }
     }
 }
 private void Awake()
 {
     m_Character = GetComponent<GearGuyCtrl1>();
 }