Ejemplo n.º 1
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }