123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- using System;
- namespace Spine
- {
- public class BoneData
- {
- public BoneData(string name, BoneData parent)
- {
- if (name == null)
- {
- throw new ArgumentNullException("name cannot be null.");
- }
- this.name = name;
- this.parent = parent;
- }
- public BoneData Parent
- {
- get
- {
- return this.parent;
- }
- }
- public string Name
- {
- get
- {
- return this.name;
- }
- }
- public float Length
- {
- get
- {
- return this.length;
- }
- set
- {
- this.length = value;
- }
- }
- public float X
- {
- get
- {
- return this.x;
- }
- set
- {
- this.x = value;
- }
- }
- public float Y
- {
- get
- {
- return this.y;
- }
- set
- {
- this.y = value;
- }
- }
- public float Rotation
- {
- get
- {
- return this.rotation;
- }
- set
- {
- this.rotation = value;
- }
- }
- public float ScaleX
- {
- get
- {
- return this.scaleX;
- }
- set
- {
- this.scaleX = value;
- }
- }
- public float ScaleY
- {
- get
- {
- return this.scaleY;
- }
- set
- {
- this.scaleY = value;
- }
- }
- public bool FlipX
- {
- get
- {
- return this.flipX;
- }
- set
- {
- this.flipX = value;
- }
- }
- public bool FlipY
- {
- get
- {
- return this.flipY;
- }
- set
- {
- this.flipY = value;
- }
- }
- public bool InheritScale
- {
- get
- {
- return this.inheritScale;
- }
- set
- {
- this.inheritScale = value;
- }
- }
- public bool InheritRotation
- {
- get
- {
- return this.inheritRotation;
- }
- set
- {
- this.inheritRotation = value;
- }
- }
- public override string ToString()
- {
- return this.name;
- }
- internal BoneData parent;
- internal string name;
- internal float length;
- internal float x;
- internal float y;
- internal float rotation;
- internal float scaleX = 1f;
- internal float scaleY = 1f;
- internal bool flipX;
- internal bool flipY;
- internal bool inheritScale = true;
- internal bool inheritRotation = true;
- }
- }
|