Advertisement
Purianite

Untitled

Mar 22nd, 2012
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. var timer : float = 1.0;
  2. var prefabBullet : GameObject;
  3.  
  4. function Update ()
  5. {
  6. timer -= Time.deltaTime;
  7. if (timer <= 0)
  8. {
  9. //Fire! But... maybe later.
  10. var instanceBullet = Instantiate(prefabBullet, transform.position, Quaternion.Euler(0,0,0));
  11. timer = 1.0;
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement