unity3D中~JS脚本的yield
function Start (){
if (!target)
target = GameObject.FindWithTag("Player").transform;
// Rather than placing this in an update function, we can start the AI's behavior now and
//use coroutines to handle the changes
yield WaitForSeconds(idleTime);
while (true)
{
// Idle around and wait for the player
yield Idle();
// Player has been located, prepare for the attack.
yield Attack();
}
}
function Idle(){......}
function Attack(){......}
请问其中的yield Idle();跟yield Attack();是什么意思?望各位大神出手相助!小弟感激不尽!
顶顶多好 真心顶 难得一见的好帖 说的非常好 很好哦 好帖就是要顶 顶顶多好 真心顶 很好哦