How can I put a sleep function between the TextUI.text = ....
, to wait 3 seconds between each phrase?
public Text GuessUI;
public Text TextUI;
you can
float Lasttime;
public float Sec = 3f;
public int Num;
void Start(){
ExampleStart();
}
public void ExampleStart(){
Lasttime = Time.time;
}
void Update{
if(Time.time - Lasttime > sec){
// if(Num == step){
// Yourcode
//You Can Change Sec with => sec = YOURTIME(Float)
// Num++;
// ExampleStart();
}
if(Num == 0){
TextUI.text = "Welcome to Number Wizard!";
Num++;
ExampleStart();
}
if(Num == 1){
TextUI.text = ("The highest number you can pick is " + max);
Num++;
ExampleStart();
}
if(Num == 2){
TextUI.text = ("The lowest number you can pick is " + min);
Num++;
ExampleStart();
}
}
}
Khaled Developer
Easy For Gaming