Advertisement
juliosantanna75

Untitled

Jan 24th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #pragma strict
  2.  
  3. var flecha : GameObject;
  4. var velocidadeFlecha: float;
  5. static var ferir : boolean;
  6.  
  7. //Script da pedra
  8. function Start () {
  9. destroeFlecha();
  10. velocidadeFlecha = 250*Time.deltaTime;
  11.  
  12. }
  13.  
  14.  
  15.  
  16.  
  17. function destroeFlecha(){
  18. //Mata a bala depois de 5 segundos que ela foi criada
  19. yield WaitForSeconds(4);
  20. Destroy(gameObject);
  21.  
  22. }
  23.  
  24.  
  25. function Update(){
  26.  
  27.  
  28. transform.Translate (0,0,velocidadeFlecha);
  29.  
  30. flecha.rigidbody.isKinematic = false;
  31. flecha.rigidbody.useGravity = true;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement