Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var timeStart : int = 10;
- var timer : int;
- private var countdown : int;
- function Update(){
- timer = Time.time;
- if(timer <= timeStart){
- countdown = timeStart - timer;
- }
- else {
- countdown = 0;
- }
- if(countdown <= 0 && transform.position.x < -3){
- transform.position.x += 10 * Time.deltaTime;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement