Hi everyone
Is there an easier way of doing this? I need my frog to cross the pond. The leg movement seems fine as it is on a continuous loop. However the body needs to move jerkily, move, pause, move again. Is there a way to loop through the function without having to yield WaitForSeconds and call iTween again, and again, and again…
Thanks for your help
function DoSwim (){
iTween.RotateTo(frogleg1,iTween.Hash("z",25,"looptype",iTween.LoopType.pingPong,"easetype",iTween.EaseType.easeInOutSine));
iTween.RotateTo(frogleg2,iTween.Hash("z",-45,"looptype",iTween.LoopType.pingPong,"easetype",iTween.EaseType.easeInOutSine));
iTween.RotateTo(frogleg3,iTween.Hash("z",25,"looptype",iTween.LoopType.pingPong,"easetype",iTween.EaseType.easeInOutSine));
iTween.RotateTo(frogleg4,iTween.Hash("z",-45,"looptype",iTween.LoopType.pingPong,"easetype",iTween.EaseType.easeInOutSine));
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
yield WaitForSeconds (2);
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
yield WaitForSeconds (2);
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
yield WaitForSeconds (2);
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
yield WaitForSeconds (2);
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
yield WaitForSeconds (2);
iTween.MoveBy(frogbody,iTween.Hash("x",5,"time",1.9,"easetype",iTween.EaseType.easeInOutSine));
}