Beispiel #1
0
 void OnTriggerEnter(Collider other)
 {
     switch(other.tag)
     {
         case "Ball":
         {
             if (refactory>1f)
             {
                 ball = other.GetComponent<BallScript> ();
                 ball.BPosessed = true;
                 ball.unitOwner = this;
                 Debug.Log ("I gots da ball");
                 hasBall = true;
                 other.transform.SetParent (tran);
                 other.transform.position = tran.TransformPoint (0, 0, 1);
                 ball.StopMe ();
             }
             break;
         }
     }
 }