コード例 #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);
                    }
                }
            }
        }
コード例 #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);
            }
        }
コード例 #3
0
 internal override void runOnNode(DNode node)
 {
     action.runOnNode(node);
 }