private void AddRandomAnimationNode()
        {
            Vector2             pos     = new Vector2(areaSize.x / 2 + position.width / 2, areaSize.y / 2 + position.height / 2);
            RandomAnimationNode newNode = new RandomAnimationNode(pos, controller.animNodeCount);

            newNode.OnEditorWindowOpen(this);
            controller.animNodeCount++;

            controller.nodes.Add(newNode);
        }
Exemple #2
0
        public override object Clone()
        {
            RandomAnimationNode clone = new RandomAnimationNode(new Vector2(windowRect.x, windowRect.y), id);

            clone.name       = name;
            clone.animations = animations;

            foreach (Transition transition in transitions)
            {
                clone.transitions.Add(transition.Clone());
            }

            clone.animation = animation;

            return(clone);
        }