| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using System;
- using System.Collections.Generic;
- [Serializable]
- public class SpineAnimationData
- {
- public JSkeleton skeleton;
- public List<JBone> bones;
- public List<JSlot> slots;
- public List<JSkin> skins;
- public Dictionary<string, object> events; // 事件定义
- public Dictionary<string, JAnimation> animations; // 动画数据
- }
- [Serializable]
- public class JSkeleton
- {
- public string hash;
- public string spine;
- public float x;
- public float y;
- public float width;
- public float height;
- public string images;
- public string audio;
- }
- [Serializable]
- public class JBone
- {
- public string name;
- public string parent;
- public string icon;
- public float length;
- public float x;
- public float y;
- public float scaleX;
- public float scaleY;
- }
- [Serializable]
- public class JSlot
- {
- public string name;
- public string bone;
- public string attachment;
- }
- [Serializable]
- public class JSkin
- {
- public string name;
- public Dictionary<string, Dictionary<string, JAttachment>> attachments;
- }
- [Serializable]
- public class JAttachment
- {
- public float x;
- public float y;
- public float scaleX;
- public float scaleY;
- public float rotation;
- public float width;
- public float height;
- }
- [Serializable]
- public class JAnimation
- {
- public Dictionary<string, object> slots; // 插槽数据
- public Dictionary<string, object> bones; // 骨骼数据
- public List<JAnimationEvent> events; // 事件数据
- public float duration; // 动画的总时长
- }
- [Serializable]
- public class JAnimationEvent
- {
- public float time; // 事件发生的时间
- public string name; // 事件名称
- }
|