示例#1
0
 // Update is called once per frame
 void Update()
 {
     GetComponent<NavMeshAgent>().destination = persuit.position;
     persuitHasBall = GameObject.Find(persuit.name).GetComponent("WRAI") as WRAI;
     if(persuitHasBall != null){ //only under certain cirumstances check it if its null dont even try
         persuitHasBallInt = persuitHasBall.hasBall;
     }
     if(persuitSack != null){
         sackHasBallInt = persuitSack.hasBall;
     }
     if (hasBall == 1){
         print("they have the ball");
     //	theBrain.ballCarrier = "DE";
         //print(theBrain.ballCarrier);
     }
 }
示例#2
0
 // Update is called once per frame
 void Update()
 {
     GetComponent <NavMeshAgent>().destination = persuit.position;
     persuitHasBall = GameObject.Find(persuit.name).GetComponent("WRAI") as WRAI;
     if (persuitHasBall != null)         //only under certain cirumstances check it if its null dont even try
     {
         persuitHasBallInt = persuitHasBall.hasBall;
     }
     if (persuitSack != null)
     {
         sackHasBallInt = persuitSack.hasBall;
     }
     if (hasBall == 1)
     {
         print("they have the ball");
         //	theBrain.ballCarrier = "DE";
         //print(theBrain.ballCarrier);
     }
 }