A useful class for systems which simply iterate over a set of nodes, performing the same action
on each node. This class removes the need for a lot of boilerplate code in such systems.
Extend this class and pass the node type and a node update method into the constructor.
The node update method will be called once per node on the update cycle
with the node instance and the frame time as parameters. e.g.
public class MySystem: ListIteratingSystem
{
override public void MySystem()
{
super( MyNode, updateNode );
}
override private void updateNode( MyNode node, Duration time )
{
// process the node here
}
}
}
A useful class for systems which simply iterate over a set of nodes, performing the same action on each node. This class removes the need for a lot of boilerplate code in such systems. Extend this class and pass the node type and a node update method into the constructor. The node update method will be called once per node on the update cycle with the node instance and the frame time as parameters. e.g.
public class MySystem: ListIteratingSystem { override public void MySystem() { super( MyNode, updateNode ); }
override private void updateNode( MyNode node, Duration time ) { // process the node here } } }