Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: make Actions taggable #222

Closed
GoogleCodeExporter opened this issue Jul 23, 2015 · 6 comments
Closed

Enhancement: make Actions taggable #222

GoogleCodeExporter opened this issue Jul 23, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

It's very good that CocosNodes are taggable, this helps a lot at times.

As a heavy user of Actions, I miss the same kind of support. For example, if I 
want to remove only a 
certain kind of action from a collection of nodes I need to manage a separate 
array. This adds 
complexity to my code and eats away memory.

Included patch makes actions taggable and adds support for managing them in 
nodes.

Note: In the future, it might be best to make the names of methods acting on 
child nodes more 
explicit. removeAll and removeAndStopAll are especially confusing because they 
don't tell you what 
they stop (child nodes? actions? timers?). removeAllChildren is a lot clearer 
to me.

Original issue reported on code.google.com by valentin...@gmail.com on 22 Feb 2009 at 9:45

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks. If it doesn't break the API -> v0.7.1, else v0.8

Original comment by ricardoq...@gmail.com on 27 Feb 2009 at 10:53

  • Changed state: Accepted
  • Added labels: Component-Actions, Milestone-Release0.7.1

@GoogleCodeExporter
Copy link
Author

Original comment by ricardoq...@gmail.com on 27 Feb 2009 at 10:53

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

fixed in r663

Original comment by ricardoq...@gmail.com on 12 Mar 2009 at 2:20

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Seems like you missed getActionByTag & stopActionByTag.

Original comment by valentin...@gmail.com on 12 Mar 2009 at 3:02

@GoogleCodeExporter
Copy link
Author

yes. fixed in r666.

Original comment by ricardoq...@gmail.com on 13 Mar 2009 at 5:56

@GoogleCodeExporter
Copy link
Author

Great! I reviewed the code, some bugs were introduced, actionsToRemove needs to 
be
taken into account otherwise you run the risk of:
* adding the same action twice to actionToRemove on repeated calls to 
stopAction[ByTag]
* accessing an action after it's been removed.

refixed in r685

Original comment by valentin...@gmail.com on 14 Mar 2009 at 10:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant