Ejemplo n.º 1
0
        public override AnimNodeData Clone()
        {
            AnimationTreeRootData node = new AnimationTreeRootData();

            node.CopyFrom(this);
            return(node);
        }
Ejemplo n.º 2
0
        public static AnimNodeData CreateNode(AnimNodeType nodeType)
        {
            AnimNodeData result = null;

            switch (nodeType)
            {
            case AnimNodeType.Sequence:
                result = new AnimNodeSequenceData();
                break;

            case AnimNodeType.Override:
                result = new AnimNodeOverrideData();
                break;

            case AnimNodeType.Blend1D:
                result = new AnimNodeBlend1DData();
                break;

            case AnimNodeType.Blend2D:
                result = new AnimNodeBlend2DData();
                break;

            case AnimNodeType.Additive:
                result = new AnimNodeAdditiveBlendingData();
                break;

            case AnimNodeType.BlendByIndex:
                result = new AnimNodeBlendByIndexData();
                break;

            case AnimNodeType.Root:
                result = new AnimationTreeRootData();
                break;
                //case AnimNodeType.SubTree:
                //    result = new AnimNodeSubTreeData();
                //    break;
            }
            return(result);
        }
Ejemplo n.º 3
0
        void AddRoot()
        {
            bool rooFound = false;

            foreach (var item in _Nodes)
            {
                if (item.NodeType == AnimNodeType.Root)
                {
                    rooFound = true;
                    break;
                }
            }

            if (!rooFound)
            {
                AnimationTreeRootData root = new AnimationTreeRootData()
                {
                    Name = "Root"
                };
                root.X = 100;
                root.Y = 200;
                this._Nodes.Add(root);
            }
        }
Ejemplo n.º 4
0
 public AnimationTreeRootItem(AnimationTreeRootData data)
     : base(data)
 {
 }