private var delayTime : float = 4;
function Start()
{
InvokeRepeating("animateObject",0,16);
print("started");
yield WaitForSeconds(3);
print("Finish");
CancelInvoke("animateObject");
}
/**function Update ()
{
}**/
function animateObject()
{
print("run");
//animation.Rewind("Rise");
animation.Play("Rise");
yield WaitForSeconds(delayTime);
//animation.Rewind("Stand");
animation.Play("Stand");
yield WaitForSeconds(delayTime);
//animation.Rewind("Stand");
animation.Play("Stand");
yield WaitForSeconds(delayTime);
//animation.Rewind("Stand");
animation.Play("Stand");
yield WaitForSeconds(delayTime);
//animation.Rewind("Sink");
animation.Play("Sink");
}
The invoking does not work... why oO?
What debug messages are being sent?
– Peter_G