Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- var guiCountDown :GUIText;
- var countMax : int;
- private var countDown : int;
- function Start(){
- guiCountDown.enabled=true;
- GameBegin();
- }
- function Update () {
- }
- function GameBegin(){
- var car =GameObject.Find("Car");
- var drivingScript =car.GetComponent("CarDynamics");
- drivingScript.enabled=false;
- for (countDown = countMax; countDown>0;countDown--){
- guiCountDown.text = countDown.ToString();
- yield WaitForSeconds(1);
- }
- guiCountDown.enabled=false;
- drivingScript.enabled=true;
- }
Advertisement
Add Comment
Please, Sign In to add comment