如何在轮换发生前设置延迟?我试过StartCoroutine,=
答案 0 :(得分:1)
计时器怎么样?
Timer timer = new Timer();
timer.Interval = 500; // Milliseconds
timer.AutoReset = false // Stop it from repeating over and over
timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
private void timer_Elapsed(object sender, ElapsedEventArgs e)
{
transform.Rotate(new Vector3(0, 0, 1) * Time.deltaTime);
}
您的密码:
if (isRolling)
{
transform.position += new Vector3 (0,1,2)
timer.Start(); // Will wait the "Interval" milliseconds and fire off Elapsed (above)
}