Advertisement
mitchellvette

Untitled

Feb 28th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. var timeStart : int = 10;
  3. var timer : int;
  4.  
  5. private var countdown : int;
  6.  
  7. function Update(){
  8.  
  9. timer = Time.time;
  10.  
  11. if(timer <= timeStart){
  12. countdown = timeStart - timer;
  13. }
  14. else {
  15. countdown = 0;
  16. }
  17.  
  18. if(countdown <= 0 && transform.position.x < -3){
  19. transform.position.x += 10 * Time.deltaTime;
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement