private object InnerLoadAnimationData(Wz_Node node) { if (node != null) { while (node.Value is Wz_Uol) { node = ((Wz_Uol)node.Value).HandleUol(node); } if (node.Value is Wz_Png) //单帧动画 { var aniData = new FrameAnimationData(); var frame = LoadFrame(node); aniData.Frames.Add(frame); return(aniData); } else if (node.Value == null && node.Nodes.Count > 0) //分析目录 { string spine = node.Nodes["spine"].GetValueEx <string>(null); if (spine != null) //读取spine动画 { var loader = new SpineTextureLoader(this, node); var atlasNode = node.Nodes[spine + ".atlas"]; var aniData = SpineAnimationData.CreateFromNode(atlasNode, null, loader); return(aniData); } else //读取序列帧动画 { var frames = new List <Frame>(); Wz_Node frameNode; for (int i = 0; (frameNode = node.Nodes[i.ToString()]) != null; i++) { var frame = LoadFrame(frameNode); frames.Add(frame); } var repeat = node.Nodes["repeat"].GetValueEx <bool>(); return(new RepeatableFrameAnimationData(frames) { Repeat = repeat }); } } } return(null); }
public void ShowAnimation(SpineAnimationData data) { this.ShowAnimation(new SpineAnimator(data)); }
public SpineAnimationData LoadSpineAnimation(Wz_Node node) { return(SpineAnimationData.CreateFromNode(node, null, this.GraphicsDevice, PluginBase.PluginManager.FindWz)); }