Skip to content

Instantly share code, notes, and snippets.

@carlows
Last active August 29, 2015 14:19
Show Gist options
  • Save carlows/9a35788d5ca1a37ac669 to your computer and use it in GitHub Desktop.
Save carlows/9a35788d5ca1a37ac669 to your computer and use it in GitHub Desktop.
if (distancia < 25.0f && distancia > 20.0f){
anim.SetBool ("Visto",true);
velocidad = 4.0f;
}
else if (distancia < 20 && distancia > 5.0f){
anim.SetBool("Visible",true);
velocidad = 2.0f;
Globales.vida -= 10 * Time.deltaTime;
else if(distancia < 5.0f){
velocidad = 0.0f;
} else {
anim.SetBool("Visible",false);
anim.SetBool ("Visto",false);
}
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