Skip to content

how to synchronize my actions with each other? #1615

Closed Answered by rh101
10100010010001001010 asked this question in Q&A
Discussion options

You must be logged in to vote

The current actions only work on one node, but you need to write a custom action that does not operate on the node it's attached to. That way, you can just add it to the scene, but it won't affect the scene. It also doesn't even have to be an action, but custom node or some other object, as long as they have an update method. It's basically just managing a list of nodes that it operates on to change their opacity.

You maintain a list (ax::Vector) of nodes within that custom object, and simply have methods like this:

ax::Vector<axNode*> _nodes;

addNode(Node* node); // adds node to _nodes
removeNode(Node* node); // removes node from _nodes

To process the nodes, you would do what the curre…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@10100010010001001010
Comment options

@rh101
Comment options

@10100010010001001010
Comment options

Comment options

You must be logged in to vote
4 replies
@10100010010001001010
Comment options

@rh101
Comment options

@10100010010001001010
Comment options

@rh101
Comment options

Answer selected by 10100010010001001010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants