Created
April 24, 2015 02:16
-
-
Save carlows/2288eb0d947c7d9602a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(distancia > 20.0f && distancia < 25.0f) | |
{ | |
mover(2.0f); | |
} | |
else if(distancia < 20.0f && distancia > 5.0f) | |
{ | |
mover(4.0f); | |
} | |
else | |
{ | |
// no puede ver al enemigo | |
// o está demasiado cerca, asi que no tiene que seguir avanzando | |
} | |
void mover(float velocidad) | |
{ | |
banshee.position += banshee.forward * velocidad * Time.deltaTime; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment