Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - chansey

Pages: [1]
1
Support / Re: Play animation by frame ?
« on: July 20, 2014, 02:54:08 pm »
Thanks :)

2
Support / Play animation by frame ?
« on: July 17, 2014, 09:43:11 am »
Hi,

I'm a newbie for 2dtoolkit.

Thanks for this awesome tool. :)

However, I have a question:

Is there any way to play animation by frame safely?  (eg: some scripts in tk2d package?)

My requirement is :

//called by simulation framework
void OnStateChanged(var state)
{
    if(state==States.Walk)
    {
        tk2dAnimator.SetClip("Walk", true); //"true" means need reset frame
    }
    //....
}

//called by simulation framework
void OnStateUpdate ()
{
    tk2dAnimator.NextFrame(); //every call NextFrame will show corresponding sprite by frame sequence.
}

my expectation is the animator synchronous with simulation update.

Very thanks.

Pages: [1]