mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-26 03:31:24 +08:00
Modified Bone.cs
Removed IEnumerable interface Added public Children getter for children List
This commit is contained in:
parent
14219d8462
commit
0fa4aad44d
@ -29,44 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Spine {
|
namespace Spine {
|
||||||
public class Bone : IEnumerable {
|
public class Bone{
|
||||||
private sealed class Enumerator : IEnumerator{
|
|
||||||
private int currentIndex = -1;
|
|
||||||
private Bone outer;
|
|
||||||
|
|
||||||
internal Enumerator(Bone outer){
|
|
||||||
this.outer = outer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool MoveNext(){
|
|
||||||
int childCount = this.outer.children.Count;
|
|
||||||
return (++this.currentIndex < childCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Reset(){
|
|
||||||
this.currentIndex = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Current{
|
|
||||||
get{
|
|
||||||
return this.outer.children[this.currentIndex];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public IEnumerator GetEnumerator ()
|
|
||||||
{
|
|
||||||
return new Enumerator(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Bone this[int i]{
|
|
||||||
get{
|
|
||||||
return children[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static public bool yDown;
|
static public bool yDown;
|
||||||
|
|
||||||
internal BoneData data;
|
internal BoneData data;
|
||||||
@ -76,10 +42,12 @@ namespace Spine {
|
|||||||
internal float x, y, rotation, rotationIK, scaleX, scaleY;
|
internal float x, y, rotation, rotationIK, scaleX, scaleY;
|
||||||
internal float m00, m01, m10, m11;
|
internal float m00, m01, m10, m11;
|
||||||
internal float worldX, worldY, worldRotation, worldScaleX, worldScaleY;
|
internal float worldX, worldY, worldRotation, worldScaleX, worldScaleY;
|
||||||
|
internal bool flipX, flipY;
|
||||||
|
|
||||||
public BoneData Data { get { return data; } }
|
public BoneData Data { get { return data; } }
|
||||||
public Skeleton Skeleton { get { return skeleton; } }
|
public Skeleton Skeleton { get { return skeleton; } }
|
||||||
public Bone Parent { get { return parent; } }
|
public Bone Parent { get { return parent; } }
|
||||||
|
public List<Bone> Children { get { return children; } }
|
||||||
public float X { get { return x; } set { x = value; } }
|
public float X { get { return x; } set { x = value; } }
|
||||||
public float Y { get { return y; } set { y = value; } }
|
public float Y { get { return y; } set { y = value; } }
|
||||||
/// <summary>The forward kinetics rotation.</summary>
|
/// <summary>The forward kinetics rotation.</summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user