Question by
martinbodor68 · Mar 30, 2019 at 10:11 AM ·
scripting problem
How to Disable Car move before 3,2,1 Go ?
I mean : Car stay (3,2,1) and after the animation my car can drive How can i write this in C# script ?
Comment
Answer by Vollmondum · Mar 30, 2019 at 10:33 AM
public float myTimer;
public string myTimerVisualized;
public bool carCanGo;
void Update()
{
if(!carCanGo && myTimer > 0)
{
myTimer -= Time.deltaTime;
myTimerVisualized = myTimer.ToString("F0");
if(myTimer <= 0)
{
carCanGo = true;
}
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612194544im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Please help me solve the problem with shoot a gun(HTC VIVE) 1 Answer
Creating Splines from empties in script 0 Answers
[ask] ienumerator not work 1 Answer
Making UI block rays with touch inputs 0 Answers
Changing characters 0 Answers