internal override void evaluateWithNode(DNode node, float dt) { elapsed += dt; if (executionCount < count) { float actionElapsed = action.elapsed; action.evaluateWithNode(node, dt); if (actionElapsed + dt > action.duration) { executionCount += 1; if (executionCount < count) { action = action.copy(); //TODO: performance action.runOnNode(node); dt = actionElapsed + dt - action.duration; elapsed -= dt; evaluateWithNode(node, dt); } } } }
internal void run(DAction action, string key) { DAction copy = action.copy(); copy.runOnNode(this); if (actions.ContainsKey(key)) { actions[key] = copy; } else { actions.Add(key, copy); } }
internal override void runOnNode(DNode node) { action.runOnNode(node); }