Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- var flecha : GameObject;
- var velocidadeFlecha: float;
- static var ferir : boolean;
- //Script da pedra
- function Start () {
- destroeFlecha();
- velocidadeFlecha = 250*Time.deltaTime;
- }
- function destroeFlecha(){
- //Mata a bala depois de 5 segundos que ela foi criada
- yield WaitForSeconds(4);
- Destroy(gameObject);
- }
- function Update(){
- transform.Translate (0,0,velocidadeFlecha);
- flecha.rigidbody.isKinematic = false;
- flecha.rigidbody.useGravity = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement