Hi and wellcome On Mon, Oct 9, 2017 at 5:07 PM, Alan Etkin <[email protected]> wrote:
> Hi everyone. I'm really new to this package and I'm looking for a way of > having an action inside a spawned/compound action "tell" another inside the > spawned action to stop whenever it (the first one) stops. To be more > precise: > > I have an Animation subclass of Action that sets an animated gif (running > undefinetely in a loop) to a node > I too have a Playsound subclass of Action also attached (and in parallel) > to the same node that must end if the Animation instance stops > > I belive I could implement stop() at Animation to browse trough the spawned > action instance and set the Playsound object's _done attribute so it would > trigger the stop method automagically (right?) but I would like to know if > there is a better way of solving the issue. > > If you do composite = Animation(...) | Playsound(...) worker_action = node.do(composite) when you call worker_action.stop() then both actions should receive a a call to .stop , no need to extra magic. You are seeing different behavior ? > As far as I searched there is no particular interface to achieve this in > the API > > Thanks in Advance > > Alan > > -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/cocos-discuss. For more options, visit https://groups.google.com/d/optout.
