playMaker

Author Topic: 2d toolkit complete api actions  (Read 12344 times)

Mayhem

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: 2d toolkit complete api actions
« Reply #15 on: June 12, 2013, 11:51:37 AM »
Hey there. I got some problems starting an Animation after another.
How should I approach this correctly? For now I'm doing this:

First State:

1. Play Animation
2. Next Frame Event

Second State:

1. Stop Animation
2. Play Animation
3. Next Frame Event

I tried "Play Animation with Events" and set the "Animation Complete Event" to "FINISHED" but it didn't help at all.

I have no Loop-Animations, all set to "Once". I would like to start another animation, when the first one reached its' last frame and is over.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: 2d toolkit complete api actions
« Reply #16 on: June 17, 2013, 10:45:55 PM »
Hi,

You should not play and then go to the second state to play another, this will only play one frame of your first anim.

instead: use "Play Animation with Events" and set the complete event to an event like "DONE", that will make you move to a second state, then you can play another anim.

 I tested with tk2d demo "5-animation", I play "demo_once" and the complete event is properly triggered, so you should study how demo_once clip is define, you may have settings that differs on your anims. I can then trigger animation again and it all seemse to work fine.

If you still have problem, don't hesitate sending me a sample, I'll see what's going on.

bye,

Jean

Mayhem

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: 2d toolkit complete api actions
« Reply #17 on: June 19, 2013, 08:59:37 AM »
I guess this works only with Animations set to "Once". I tried it with Loop/LoopSection/Single-Animations, but didn't work that way. "Once" works fine that way.

Any suggestions for the other Modes?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: 2d toolkit complete api actions
« Reply #18 on: June 19, 2013, 10:40:28 PM »
Hi,

 I'll ask the guy. Cause here I am only implementing a delegate so if it doesn't work on other anim setting, it's something within 2dtoolkit.

bye,

 Jean

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
    • 上海杉蔓数字科技
Re: 2d toolkit complete api actions
« Reply #19 on: September 20, 2013, 10:47:24 AM »
how can the button down active the event in playmaker? Uiitem can send message, but we need the playmaker's event know it

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: 2d toolkit complete api actions
« Reply #20 on: September 22, 2013, 10:38:39 PM »
Hi,

 you'll have to implement something similar to what exists for ngui, an event bridge monobehavior.

 that behavior will be on the button gameobject, and you will bind 2d toolkit events with playmaker events to forward.

 Does that make sense?

bye,

 Jean