Example #1
0
 //Calculate the distance between the player and lancer
 void GetDistance()
 {
     distance = Vector3.Distance(lancer.getPlayerPosition(), lancer.transform.position);
 }
Example #2
0
 //distance between player and lancer
 public float GetDistance()
 {
     return(distance = Vector3.Distance(lancer.getPlayerPosition(), lancer.detectPlayerSphere.position));
 }