diff --git a/Spine/SpineWrappers/TextureLoader.cs b/Spine/Implementations/TextureLoader.cs similarity index 99% rename from Spine/SpineWrappers/TextureLoader.cs rename to Spine/Implementations/TextureLoader.cs index 0d6b0dc..4eb8da1 100644 --- a/Spine/SpineWrappers/TextureLoader.cs +++ b/Spine/Implementations/TextureLoader.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Implementations { /// /// 实现不同版本的 TextureLoader diff --git a/Spine/Implementations/SpineWrappers/V21/Animation21.cs b/Spine/Implementations/V21/Animation21.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V21/Animation21.cs rename to Spine/Implementations/V21/Animation21.cs index 8ce3b98..b9cc52a 100644 --- a/Spine/Implementations/SpineWrappers/V21/Animation21.cs +++ b/Spine/Implementations/V21/Animation21.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime21; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class Animation21(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V21/AnimationState21.cs b/Spine/Implementations/V21/AnimationState21.cs similarity index 94% rename from Spine/Implementations/SpineWrappers/V21/AnimationState21.cs rename to Spine/Implementations/V21/AnimationState21.cs index d0728f2..0b8d18a 100644 --- a/Spine/Implementations/SpineWrappers/V21/AnimationState21.cs +++ b/Spine/Implementations/V21/AnimationState21.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class AnimationState21(AnimationState innerObject, SpineObjectData21 data) : IAnimationState { @@ -35,7 +35,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -64,7 +64,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -93,7 +93,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; diff --git a/Spine/Implementations/SpineWrappers/V21/Attachments/Attachment21.cs b/Spine/Implementations/V21/Attachments/Attachment21.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V21/Attachments/Attachment21.cs rename to Spine/Implementations/V21/Attachments/Attachment21.cs index 21e2f73..bf10b6e 100644 --- a/Spine/Implementations/SpineWrappers/V21/Attachments/Attachment21.cs +++ b/Spine/Implementations/V21/Attachments/Attachment21.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21.Attachments +namespace Spine.Implementations.V21.Attachments { internal abstract class Attachment21(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V21/Attachments/BoundingBoxAttachment21.cs b/Spine/Implementations/V21/Attachments/BoundingBoxAttachment21.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V21/Attachments/BoundingBoxAttachment21.cs rename to Spine/Implementations/V21/Attachments/BoundingBoxAttachment21.cs index 049e530..8da9413 100644 --- a/Spine/Implementations/SpineWrappers/V21/Attachments/BoundingBoxAttachment21.cs +++ b/Spine/Implementations/V21/Attachments/BoundingBoxAttachment21.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V21; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21.Attachments +namespace Spine.Implementations.V21.Attachments { internal sealed class BoundingBoxAttachment21(BoundingBoxAttachment innerObject) : Attachment21(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot21 st) { diff --git a/Spine/Implementations/SpineWrappers/V21/Attachments/MeshAttachment21.cs b/Spine/Implementations/V21/Attachments/MeshAttachment21.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V21/Attachments/MeshAttachment21.cs rename to Spine/Implementations/V21/Attachments/MeshAttachment21.cs index c77666c..be998bf 100644 --- a/Spine/Implementations/SpineWrappers/V21/Attachments/MeshAttachment21.cs +++ b/Spine/Implementations/V21/Attachments/MeshAttachment21.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V21; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21.Attachments +namespace Spine.Implementations.V21.Attachments { internal sealed class MeshAttachment21(MeshAttachment innerObject) : Attachment21(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot21 st) { diff --git a/Spine/Implementations/SpineWrappers/V21/Attachments/RegionAttachment21.cs b/Spine/Implementations/V21/Attachments/RegionAttachment21.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V21/Attachments/RegionAttachment21.cs rename to Spine/Implementations/V21/Attachments/RegionAttachment21.cs index 9f6c9fd..48089f8 100644 --- a/Spine/Implementations/SpineWrappers/V21/Attachments/RegionAttachment21.cs +++ b/Spine/Implementations/V21/Attachments/RegionAttachment21.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V21; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21.Attachments +namespace Spine.Implementations.V21.Attachments { internal sealed class RegionAttachment21(RegionAttachment innerObject) : Attachment21(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot21 st) { diff --git a/Spine/Implementations/SpineWrappers/V21/Attachments/SkinnedMeshAttachment21.cs b/Spine/Implementations/V21/Attachments/SkinnedMeshAttachment21.cs similarity index 86% rename from Spine/Implementations/SpineWrappers/V21/Attachments/SkinnedMeshAttachment21.cs rename to Spine/Implementations/V21/Attachments/SkinnedMeshAttachment21.cs index 28f15a3..fe39657 100644 --- a/Spine/Implementations/SpineWrappers/V21/Attachments/SkinnedMeshAttachment21.cs +++ b/Spine/Implementations/V21/Attachments/SkinnedMeshAttachment21.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V21; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21.Attachments +namespace Spine.Implementations.V21.Attachments { internal sealed class SkinnedMeshAttachment21(SkinnedMeshAttachment innerObject) : Attachment21(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V21.Attachments public override SkinnedMeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot21 st) { diff --git a/Spine/Implementations/SpineWrappers/V21/Bone21.cs b/Spine/Implementations/V21/Bone21.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V21/Bone21.cs rename to Spine/Implementations/V21/Bone21.cs index 19e0e2a..e5a518a 100644 --- a/Spine/Implementations/SpineWrappers/V21/Bone21.cs +++ b/Spine/Implementations/V21/Bone21.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class Bone21(Bone innerObject, Bone21? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V21/Skeleton21.cs b/Spine/Implementations/V21/Skeleton21.cs similarity index 94% rename from Spine/Implementations/SpineWrappers/V21/Skeleton21.cs rename to Spine/Implementations/V21/Skeleton21.cs index 0c8915a..e88fbe8 100644 --- a/Spine/Implementations/SpineWrappers/V21/Skeleton21.cs +++ b/Spine/Implementations/V21/Skeleton21.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime21; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class Skeleton21 : ISkeleton { @@ -95,11 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V21 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - _o.GetBounds(out x, out y, out w, out h); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V21/SkeletonClipping21.cs b/Spine/Implementations/V21/SkeletonClipping21.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V21/SkeletonClipping21.cs rename to Spine/Implementations/V21/SkeletonClipping21.cs index cedba18..7dd1075 100644 --- a/Spine/Implementations/SpineWrappers/V21/SkeletonClipping21.cs +++ b/Spine/Implementations/V21/SkeletonClipping21.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime21; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class SkeletonClipping21 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V21/Skin21.cs b/Spine/Implementations/V21/Skin21.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V21/Skin21.cs rename to Spine/Implementations/V21/Skin21.cs index 08e1b00..389283f 100644 --- a/Spine/Implementations/SpineWrappers/V21/Skin21.cs +++ b/Spine/Implementations/V21/Skin21.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime21; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class Skin21 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V21/Slot21.cs b/Spine/Implementations/V21/Slot21.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V21/Slot21.cs rename to Spine/Implementations/V21/Slot21.cs index d88eb07..cd87612 100644 --- a/Spine/Implementations/SpineWrappers/V21/Slot21.cs +++ b/Spine/Implementations/V21/Slot21.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime21; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class Slot21 : ISlot { @@ -39,7 +40,7 @@ namespace Spine.Implementations.SpineWrappers.V21 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V21/SpineObjectData21.cs b/Spine/Implementations/V21/SpineObjectData21.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V21/SpineObjectData21.cs rename to Spine/Implementations/V21/SpineObjectData21.cs index f14525b..d4a39c4 100644 --- a/Spine/Implementations/SpineWrappers/V21/SpineObjectData21.cs +++ b/Spine/Implementations/V21/SpineObjectData21.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime21; -using Spine.Implementations.SpineWrappers.V21.Attachments; +using Spine.Implementations.V21.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { [SpineImplementation(2, 1)] internal sealed class SpineObjectData21 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V21 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData21(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData21(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V21/TrackEntry21.cs b/Spine/Implementations/V21/TrackEntry21.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V21/TrackEntry21.cs rename to Spine/Implementations/V21/TrackEntry21.cs index bd0121d..ae0c03b 100644 --- a/Spine/Implementations/SpineWrappers/V21/TrackEntry21.cs +++ b/Spine/Implementations/V21/TrackEntry21.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime21; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V21 +namespace Spine.Implementations.V21 { internal sealed class TrackEntry21(TrackEntry innerObject, AnimationState21 animationState, SpineObjectData21 data): ITrackEntry { @@ -34,7 +34,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -63,7 +63,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -92,7 +92,7 @@ namespace Spine.Implementations.SpineWrappers.V21 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; diff --git a/Spine/Implementations/SpineWrappers/V34/Animation34.cs b/Spine/Implementations/V34/Animation34.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V34/Animation34.cs rename to Spine/Implementations/V34/Animation34.cs index 99e97ab..bb0b752 100644 --- a/Spine/Implementations/SpineWrappers/V34/Animation34.cs +++ b/Spine/Implementations/V34/Animation34.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime34; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class Animation34(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V34/AnimationState34.cs b/Spine/Implementations/V34/AnimationState34.cs similarity index 94% rename from Spine/Implementations/SpineWrappers/V34/AnimationState34.cs rename to Spine/Implementations/V34/AnimationState34.cs index b9f86c6..bbab97e 100644 --- a/Spine/Implementations/SpineWrappers/V34/AnimationState34.cs +++ b/Spine/Implementations/V34/AnimationState34.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class AnimationState34(AnimationState innerObject, SpineObjectData34 data) : IAnimationState { @@ -36,7 +36,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -65,7 +65,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -94,7 +94,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; diff --git a/Spine/Implementations/SpineWrappers/V34/Attachments/Attachment34.cs b/Spine/Implementations/V34/Attachments/Attachment34.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V34/Attachments/Attachment34.cs rename to Spine/Implementations/V34/Attachments/Attachment34.cs index a5664df..ec79000 100644 --- a/Spine/Implementations/SpineWrappers/V34/Attachments/Attachment34.cs +++ b/Spine/Implementations/V34/Attachments/Attachment34.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34.Attachments +namespace Spine.Implementations.V34.Attachments { internal abstract class Attachment34(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V34/Attachments/BoundingBoxAttachment34.cs b/Spine/Implementations/V34/Attachments/BoundingBoxAttachment34.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V34/Attachments/BoundingBoxAttachment34.cs rename to Spine/Implementations/V34/Attachments/BoundingBoxAttachment34.cs index 74aeea5..2584e24 100644 --- a/Spine/Implementations/SpineWrappers/V34/Attachments/BoundingBoxAttachment34.cs +++ b/Spine/Implementations/V34/Attachments/BoundingBoxAttachment34.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V34; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34.Attachments +namespace Spine.Implementations.V34.Attachments { internal sealed class BoundingBoxAttachment34(BoundingBoxAttachment innerObject) : Attachment34(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot34 st) { diff --git a/Spine/Implementations/SpineWrappers/V34/Attachments/MeshAttachment34.cs b/Spine/Implementations/V34/Attachments/MeshAttachment34.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V34/Attachments/MeshAttachment34.cs rename to Spine/Implementations/V34/Attachments/MeshAttachment34.cs index a16733b..e4868cc 100644 --- a/Spine/Implementations/SpineWrappers/V34/Attachments/MeshAttachment34.cs +++ b/Spine/Implementations/V34/Attachments/MeshAttachment34.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V34; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34.Attachments +namespace Spine.Implementations.V34.Attachments { internal sealed class MeshAttachment34(MeshAttachment innerObject) : Attachment34(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot34 st) { diff --git a/Spine/Implementations/SpineWrappers/V34/Attachments/PathAttachment34.cs b/Spine/Implementations/V34/Attachments/PathAttachment34.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V34/Attachments/PathAttachment34.cs rename to Spine/Implementations/V34/Attachments/PathAttachment34.cs index df3fd69..c4c2084 100644 --- a/Spine/Implementations/SpineWrappers/V34/Attachments/PathAttachment34.cs +++ b/Spine/Implementations/V34/Attachments/PathAttachment34.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V34; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34.Attachments +namespace Spine.Implementations.V34.Attachments { internal sealed class PathAttachment34(PathAttachment innerObject) : Attachment34(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot34 st) { diff --git a/Spine/Implementations/SpineWrappers/V34/Attachments/RegionAttachment34.cs b/Spine/Implementations/V34/Attachments/RegionAttachment34.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V34/Attachments/RegionAttachment34.cs rename to Spine/Implementations/V34/Attachments/RegionAttachment34.cs index 5f1a6f0..db0f312 100644 --- a/Spine/Implementations/SpineWrappers/V34/Attachments/RegionAttachment34.cs +++ b/Spine/Implementations/V34/Attachments/RegionAttachment34.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V34; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34.Attachments +namespace Spine.Implementations.V34.Attachments { internal sealed class RegionAttachment34(RegionAttachment innerObject) : Attachment34(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V34.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot34 st) { diff --git a/Spine/Implementations/SpineWrappers/V34/Bone34.cs b/Spine/Implementations/V34/Bone34.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V34/Bone34.cs rename to Spine/Implementations/V34/Bone34.cs index dff74e7..0223740 100644 --- a/Spine/Implementations/SpineWrappers/V34/Bone34.cs +++ b/Spine/Implementations/V34/Bone34.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class Bone34(Bone innerObject, Bone34? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V34/Skeleton34.cs b/Spine/Implementations/V34/Skeleton34.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V34/Skeleton34.cs rename to Spine/Implementations/V34/Skeleton34.cs index fee3d5e..706c021 100644 --- a/Spine/Implementations/SpineWrappers/V34/Skeleton34.cs +++ b/Spine/Implementations/V34/Skeleton34.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime34; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class Skeleton34 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V34 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V34/SkeletonClipping34.cs b/Spine/Implementations/V34/SkeletonClipping34.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V34/SkeletonClipping34.cs rename to Spine/Implementations/V34/SkeletonClipping34.cs index 7b5cc8f..7465956 100644 --- a/Spine/Implementations/SpineWrappers/V34/SkeletonClipping34.cs +++ b/Spine/Implementations/V34/SkeletonClipping34.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime34; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class SkeletonClipping34 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V34/Skin34.cs b/Spine/Implementations/V34/Skin34.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V34/Skin34.cs rename to Spine/Implementations/V34/Skin34.cs index dd06db8..38870b7 100644 --- a/Spine/Implementations/SpineWrappers/V34/Skin34.cs +++ b/Spine/Implementations/V34/Skin34.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime34; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class Skin34 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V34/Slot34.cs b/Spine/Implementations/V34/Slot34.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V34/Slot34.cs rename to Spine/Implementations/V34/Slot34.cs index b98b193..28ba545 100644 --- a/Spine/Implementations/SpineWrappers/V34/Slot34.cs +++ b/Spine/Implementations/V34/Slot34.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime34; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class Slot34 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V34 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V34/SpineObjectData34.cs b/Spine/Implementations/V34/SpineObjectData34.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V34/SpineObjectData34.cs rename to Spine/Implementations/V34/SpineObjectData34.cs index 729f65b..ae31a3a 100644 --- a/Spine/Implementations/SpineWrappers/V34/SpineObjectData34.cs +++ b/Spine/Implementations/V34/SpineObjectData34.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime34; -using Spine.Implementations.SpineWrappers.V34.Attachments; +using Spine.Implementations.V34.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { [SpineImplementation(3, 4)] internal sealed class SpineObjectData34 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V34 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData34(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData34(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V34/TrackEntry34.cs b/Spine/Implementations/V34/TrackEntry34.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V34/TrackEntry34.cs rename to Spine/Implementations/V34/TrackEntry34.cs index 7bc9482..12f1126 100644 --- a/Spine/Implementations/SpineWrappers/V34/TrackEntry34.cs +++ b/Spine/Implementations/V34/TrackEntry34.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime34; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V34 +namespace Spine.Implementations.V34 { internal sealed class TrackEntry34(TrackEntry innerObject, AnimationState34 animationState, SpineObjectData34 data): ITrackEntry { @@ -34,7 +34,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -63,7 +63,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -92,7 +92,7 @@ namespace Spine.Implementations.SpineWrappers.V34 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; diff --git a/Spine/Implementations/SpineWrappers/V35/Animation35.cs b/Spine/Implementations/V35/Animation35.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V35/Animation35.cs rename to Spine/Implementations/V35/Animation35.cs index 5c21bd6..99fe05a 100644 --- a/Spine/Implementations/SpineWrappers/V35/Animation35.cs +++ b/Spine/Implementations/V35/Animation35.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime35; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class Animation35(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V35/AnimationState35.cs b/Spine/Implementations/V35/AnimationState35.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V35/AnimationState35.cs rename to Spine/Implementations/V35/AnimationState35.cs index 7673533..8115520 100644 --- a/Spine/Implementations/SpineWrappers/V35/AnimationState35.cs +++ b/Spine/Implementations/V35/AnimationState35.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class AnimationState35(AnimationState innerObject, SpineObjectData35 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/Attachment35.cs b/Spine/Implementations/V35/Attachments/Attachment35.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V35/Attachments/Attachment35.cs rename to Spine/Implementations/V35/Attachments/Attachment35.cs index 10bc162..f473f5f 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/Attachment35.cs +++ b/Spine/Implementations/V35/Attachments/Attachment35.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal abstract class Attachment35(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/BoundingBoxAttachment35.cs b/Spine/Implementations/V35/Attachments/BoundingBoxAttachment35.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V35/Attachments/BoundingBoxAttachment35.cs rename to Spine/Implementations/V35/Attachments/BoundingBoxAttachment35.cs index d7db614..a8ff535 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/BoundingBoxAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/BoundingBoxAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class BoundingBoxAttachment35(BoundingBoxAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/ClippingAttachment35.cs b/Spine/Implementations/V35/Attachments/ClippingAttachment35.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V35/Attachments/ClippingAttachment35.cs rename to Spine/Implementations/V35/Attachments/ClippingAttachment35.cs index 5fb91ba..d37dae3 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/ClippingAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/ClippingAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class ClippingAttachment35(ClippingAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/MeshAttachment35.cs b/Spine/Implementations/V35/Attachments/MeshAttachment35.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V35/Attachments/MeshAttachment35.cs rename to Spine/Implementations/V35/Attachments/MeshAttachment35.cs index 363576c..e0b4dfc 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/MeshAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/MeshAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class MeshAttachment35(MeshAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/PathAttachment35.cs b/Spine/Implementations/V35/Attachments/PathAttachment35.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V35/Attachments/PathAttachment35.cs rename to Spine/Implementations/V35/Attachments/PathAttachment35.cs index 87fc52d..7e0a7c7 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/PathAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/PathAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class PathAttachment35(PathAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/PointAttachment35.cs b/Spine/Implementations/V35/Attachments/PointAttachment35.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V35/Attachments/PointAttachment35.cs rename to Spine/Implementations/V35/Attachments/PointAttachment35.cs index 5993724..387c401 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/PointAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/PointAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class PointAttachment35(PointAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Attachments/RegionAttachment35.cs b/Spine/Implementations/V35/Attachments/RegionAttachment35.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V35/Attachments/RegionAttachment35.cs rename to Spine/Implementations/V35/Attachments/RegionAttachment35.cs index b4d820a..29ebb35 100644 --- a/Spine/Implementations/SpineWrappers/V35/Attachments/RegionAttachment35.cs +++ b/Spine/Implementations/V35/Attachments/RegionAttachment35.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35.Attachments +namespace Spine.Implementations.V35.Attachments { internal sealed class RegionAttachment35(RegionAttachment innerObject) : Attachment35(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V35.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot35 st) { diff --git a/Spine/Implementations/SpineWrappers/V35/Bone35.cs b/Spine/Implementations/V35/Bone35.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V35/Bone35.cs rename to Spine/Implementations/V35/Bone35.cs index c6f7f3e..f59a567 100644 --- a/Spine/Implementations/SpineWrappers/V35/Bone35.cs +++ b/Spine/Implementations/V35/Bone35.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class Bone35(Bone innerObject, Bone35? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V35/Skeleton35.cs b/Spine/Implementations/V35/Skeleton35.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V35/Skeleton35.cs rename to Spine/Implementations/V35/Skeleton35.cs index 53a77c6..baaa8b5 100644 --- a/Spine/Implementations/SpineWrappers/V35/Skeleton35.cs +++ b/Spine/Implementations/V35/Skeleton35.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime35; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class Skeleton35 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V35 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V35/SkeletonClipping35.cs b/Spine/Implementations/V35/SkeletonClipping35.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V35/SkeletonClipping35.cs rename to Spine/Implementations/V35/SkeletonClipping35.cs index e55d619..17555b6 100644 --- a/Spine/Implementations/SpineWrappers/V35/SkeletonClipping35.cs +++ b/Spine/Implementations/V35/SkeletonClipping35.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime35; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class SkeletonClipping35 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V35/Skin35.cs b/Spine/Implementations/V35/Skin35.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V35/Skin35.cs rename to Spine/Implementations/V35/Skin35.cs index 46af8ef..a2c5a71 100644 --- a/Spine/Implementations/SpineWrappers/V35/Skin35.cs +++ b/Spine/Implementations/V35/Skin35.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime35; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class Skin35 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V35/Slot35.cs b/Spine/Implementations/V35/Slot35.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V35/Slot35.cs rename to Spine/Implementations/V35/Slot35.cs index f202e03..ae6706a 100644 --- a/Spine/Implementations/SpineWrappers/V35/Slot35.cs +++ b/Spine/Implementations/V35/Slot35.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime35; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class Slot35 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V35 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V35/SpineObjectData35.cs b/Spine/Implementations/V35/SpineObjectData35.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V35/SpineObjectData35.cs rename to Spine/Implementations/V35/SpineObjectData35.cs index 2d19ea9..4b29545 100644 --- a/Spine/Implementations/SpineWrappers/V35/SpineObjectData35.cs +++ b/Spine/Implementations/V35/SpineObjectData35.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime35; -using Spine.Implementations.SpineWrappers.V35.Attachments; +using Spine.Implementations.V35.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { [SpineImplementation(3, 5)] internal sealed class SpineObjectData35 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V35 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData35(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData35(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V35/TrackEntry35.cs b/Spine/Implementations/V35/TrackEntry35.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V35/TrackEntry35.cs rename to Spine/Implementations/V35/TrackEntry35.cs index 37de769..0dbf280 100644 --- a/Spine/Implementations/SpineWrappers/V35/TrackEntry35.cs +++ b/Spine/Implementations/V35/TrackEntry35.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime35; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V35 +namespace Spine.Implementations.V35 { internal sealed class TrackEntry35(TrackEntry innerObject, AnimationState35 animationState, SpineObjectData35 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V35 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V36/Animation36.cs b/Spine/Implementations/V36/Animation36.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V36/Animation36.cs rename to Spine/Implementations/V36/Animation36.cs index 51cf8c2..6906276 100644 --- a/Spine/Implementations/SpineWrappers/V36/Animation36.cs +++ b/Spine/Implementations/V36/Animation36.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime36; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class Animation36(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V36/AnimationState36.cs b/Spine/Implementations/V36/AnimationState36.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V36/AnimationState36.cs rename to Spine/Implementations/V36/AnimationState36.cs index e5b0c58..359513a 100644 --- a/Spine/Implementations/SpineWrappers/V36/AnimationState36.cs +++ b/Spine/Implementations/V36/AnimationState36.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class AnimationState36(AnimationState innerObject, SpineObjectData36 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/Attachment36.cs b/Spine/Implementations/V36/Attachments/Attachment36.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V36/Attachments/Attachment36.cs rename to Spine/Implementations/V36/Attachments/Attachment36.cs index d61bffc..6a1f596 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/Attachment36.cs +++ b/Spine/Implementations/V36/Attachments/Attachment36.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal abstract class Attachment36(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/BoundingBoxAttachment36.cs b/Spine/Implementations/V36/Attachments/BoundingBoxAttachment36.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V36/Attachments/BoundingBoxAttachment36.cs rename to Spine/Implementations/V36/Attachments/BoundingBoxAttachment36.cs index 6674bcf..13395c2 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/BoundingBoxAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/BoundingBoxAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class BoundingBoxAttachment36(BoundingBoxAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/ClippingAttachment36.cs b/Spine/Implementations/V36/Attachments/ClippingAttachment36.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V36/Attachments/ClippingAttachment36.cs rename to Spine/Implementations/V36/Attachments/ClippingAttachment36.cs index e8fae73..5918030 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/ClippingAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/ClippingAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class ClippingAttachment36(ClippingAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/MeshAttachment36.cs b/Spine/Implementations/V36/Attachments/MeshAttachment36.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V36/Attachments/MeshAttachment36.cs rename to Spine/Implementations/V36/Attachments/MeshAttachment36.cs index 6040e62..0bcc14e 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/MeshAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/MeshAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class MeshAttachment36(MeshAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/PathAttachment36.cs b/Spine/Implementations/V36/Attachments/PathAttachment36.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V36/Attachments/PathAttachment36.cs rename to Spine/Implementations/V36/Attachments/PathAttachment36.cs index b25fc91..8177a7b 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/PathAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/PathAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class PathAttachment36(PathAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/PointAttachment36.cs b/Spine/Implementations/V36/Attachments/PointAttachment36.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V36/Attachments/PointAttachment36.cs rename to Spine/Implementations/V36/Attachments/PointAttachment36.cs index 56db482..a94727f 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/PointAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/PointAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class PointAttachment36(PointAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Attachments/RegionAttachment36.cs b/Spine/Implementations/V36/Attachments/RegionAttachment36.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V36/Attachments/RegionAttachment36.cs rename to Spine/Implementations/V36/Attachments/RegionAttachment36.cs index c0a98fe..806bf36 100644 --- a/Spine/Implementations/SpineWrappers/V36/Attachments/RegionAttachment36.cs +++ b/Spine/Implementations/V36/Attachments/RegionAttachment36.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36.Attachments +namespace Spine.Implementations.V36.Attachments { internal sealed class RegionAttachment36(RegionAttachment innerObject) : Attachment36(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V36.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot36 st) { diff --git a/Spine/Implementations/SpineWrappers/V36/Bone36.cs b/Spine/Implementations/V36/Bone36.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V36/Bone36.cs rename to Spine/Implementations/V36/Bone36.cs index cca0d7b..74a7e32 100644 --- a/Spine/Implementations/SpineWrappers/V36/Bone36.cs +++ b/Spine/Implementations/V36/Bone36.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class Bone36(Bone innerObject, Bone36? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V36/Skeleton36.cs b/Spine/Implementations/V36/Skeleton36.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V36/Skeleton36.cs rename to Spine/Implementations/V36/Skeleton36.cs index 5429dc9..ee81a72 100644 --- a/Spine/Implementations/SpineWrappers/V36/Skeleton36.cs +++ b/Spine/Implementations/V36/Skeleton36.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime36; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class Skeleton36 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V36 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V36/SkeletonClipping36.cs b/Spine/Implementations/V36/SkeletonClipping36.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V36/SkeletonClipping36.cs rename to Spine/Implementations/V36/SkeletonClipping36.cs index 5386eed..62a45b0 100644 --- a/Spine/Implementations/SpineWrappers/V36/SkeletonClipping36.cs +++ b/Spine/Implementations/V36/SkeletonClipping36.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime36; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class SkeletonClipping36 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V36/Skin36.cs b/Spine/Implementations/V36/Skin36.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V36/Skin36.cs rename to Spine/Implementations/V36/Skin36.cs index 32ccfb1..cd9d6e6 100644 --- a/Spine/Implementations/SpineWrappers/V36/Skin36.cs +++ b/Spine/Implementations/V36/Skin36.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime36; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class Skin36 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V36/Slot36.cs b/Spine/Implementations/V36/Slot36.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V36/Slot36.cs rename to Spine/Implementations/V36/Slot36.cs index 430c0b5..ddc8d7f 100644 --- a/Spine/Implementations/SpineWrappers/V36/Slot36.cs +++ b/Spine/Implementations/V36/Slot36.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime36; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class Slot36 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V36 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V36/SpineObjectData36.cs b/Spine/Implementations/V36/SpineObjectData36.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V36/SpineObjectData36.cs rename to Spine/Implementations/V36/SpineObjectData36.cs index 67037a3..e7846f7 100644 --- a/Spine/Implementations/SpineWrappers/V36/SpineObjectData36.cs +++ b/Spine/Implementations/V36/SpineObjectData36.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime36; -using Spine.Implementations.SpineWrappers.V36.Attachments; +using Spine.Implementations.V36.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { [SpineImplementation(3, 6)] internal sealed class SpineObjectData36 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V36 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData36(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData36(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V36/TrackEntry36.cs b/Spine/Implementations/V36/TrackEntry36.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V36/TrackEntry36.cs rename to Spine/Implementations/V36/TrackEntry36.cs index 6b86817..0c47b1f 100644 --- a/Spine/Implementations/SpineWrappers/V36/TrackEntry36.cs +++ b/Spine/Implementations/V36/TrackEntry36.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime36; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V36 +namespace Spine.Implementations.V36 { internal sealed class TrackEntry36(TrackEntry innerObject, AnimationState36 animationState, SpineObjectData36 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V36 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V37/Animation37.cs b/Spine/Implementations/V37/Animation37.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V37/Animation37.cs rename to Spine/Implementations/V37/Animation37.cs index 9b21d5a..69d12a5 100644 --- a/Spine/Implementations/SpineWrappers/V37/Animation37.cs +++ b/Spine/Implementations/V37/Animation37.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime37; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class Animation37(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V37/AnimationState37.cs b/Spine/Implementations/V37/AnimationState37.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V37/AnimationState37.cs rename to Spine/Implementations/V37/AnimationState37.cs index f14f93c..3237e19 100644 --- a/Spine/Implementations/SpineWrappers/V37/AnimationState37.cs +++ b/Spine/Implementations/V37/AnimationState37.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class AnimationState37(AnimationState innerObject, SpineObjectData37 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/Attachment37.cs b/Spine/Implementations/V37/Attachments/Attachment37.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V37/Attachments/Attachment37.cs rename to Spine/Implementations/V37/Attachments/Attachment37.cs index 2a23a2c..898f701 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/Attachment37.cs +++ b/Spine/Implementations/V37/Attachments/Attachment37.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal abstract class Attachment37(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/BoundingBoxAttachment37.cs b/Spine/Implementations/V37/Attachments/BoundingBoxAttachment37.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V37/Attachments/BoundingBoxAttachment37.cs rename to Spine/Implementations/V37/Attachments/BoundingBoxAttachment37.cs index 270ac8d..efc3102 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/BoundingBoxAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/BoundingBoxAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class BoundingBoxAttachment37(BoundingBoxAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/ClippingAttachment37.cs b/Spine/Implementations/V37/Attachments/ClippingAttachment37.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V37/Attachments/ClippingAttachment37.cs rename to Spine/Implementations/V37/Attachments/ClippingAttachment37.cs index b8761df..e60c823 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/ClippingAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/ClippingAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class ClippingAttachment37(ClippingAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/MeshAttachment37.cs b/Spine/Implementations/V37/Attachments/MeshAttachment37.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V37/Attachments/MeshAttachment37.cs rename to Spine/Implementations/V37/Attachments/MeshAttachment37.cs index 6937945..4ef404e 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/MeshAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/MeshAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class MeshAttachment37(MeshAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/PathAttachment37.cs b/Spine/Implementations/V37/Attachments/PathAttachment37.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V37/Attachments/PathAttachment37.cs rename to Spine/Implementations/V37/Attachments/PathAttachment37.cs index 412051b..4574252 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/PathAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/PathAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class PathAttachment37(PathAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/PointAttachment37.cs b/Spine/Implementations/V37/Attachments/PointAttachment37.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V37/Attachments/PointAttachment37.cs rename to Spine/Implementations/V37/Attachments/PointAttachment37.cs index fc9a1fc..8a804dd 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/PointAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/PointAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class PointAttachment37(PointAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Attachments/RegionAttachment37.cs b/Spine/Implementations/V37/Attachments/RegionAttachment37.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V37/Attachments/RegionAttachment37.cs rename to Spine/Implementations/V37/Attachments/RegionAttachment37.cs index f772c09..2f65e69 100644 --- a/Spine/Implementations/SpineWrappers/V37/Attachments/RegionAttachment37.cs +++ b/Spine/Implementations/V37/Attachments/RegionAttachment37.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37.Attachments +namespace Spine.Implementations.V37.Attachments { internal sealed class RegionAttachment37(RegionAttachment innerObject) : Attachment37(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V37.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot37 st) { diff --git a/Spine/Implementations/SpineWrappers/V37/Bone37.cs b/Spine/Implementations/V37/Bone37.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V37/Bone37.cs rename to Spine/Implementations/V37/Bone37.cs index 571d023..f55f036 100644 --- a/Spine/Implementations/SpineWrappers/V37/Bone37.cs +++ b/Spine/Implementations/V37/Bone37.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class Bone37(Bone innerObject, Bone37? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V37/Skeleton37.cs b/Spine/Implementations/V37/Skeleton37.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V37/Skeleton37.cs rename to Spine/Implementations/V37/Skeleton37.cs index fad3cf6..d3e233d 100644 --- a/Spine/Implementations/SpineWrappers/V37/Skeleton37.cs +++ b/Spine/Implementations/V37/Skeleton37.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime37; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class Skeleton37 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V37 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V37/SkeletonClipping37.cs b/Spine/Implementations/V37/SkeletonClipping37.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V37/SkeletonClipping37.cs rename to Spine/Implementations/V37/SkeletonClipping37.cs index ed6d412..9be4656 100644 --- a/Spine/Implementations/SpineWrappers/V37/SkeletonClipping37.cs +++ b/Spine/Implementations/V37/SkeletonClipping37.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime37; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class SkeletonClipping37 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V37/Skin37.cs b/Spine/Implementations/V37/Skin37.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V37/Skin37.cs rename to Spine/Implementations/V37/Skin37.cs index 41c41fc..94ecb9e 100644 --- a/Spine/Implementations/SpineWrappers/V37/Skin37.cs +++ b/Spine/Implementations/V37/Skin37.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime37; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class Skin37 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V37/Slot37.cs b/Spine/Implementations/V37/Slot37.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V37/Slot37.cs rename to Spine/Implementations/V37/Slot37.cs index 55c5330..e54292d 100644 --- a/Spine/Implementations/SpineWrappers/V37/Slot37.cs +++ b/Spine/Implementations/V37/Slot37.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime37; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class Slot37 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V37 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V37/SpineObjectData37.cs b/Spine/Implementations/V37/SpineObjectData37.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V37/SpineObjectData37.cs rename to Spine/Implementations/V37/SpineObjectData37.cs index 3851834..b8674b2 100644 --- a/Spine/Implementations/SpineWrappers/V37/SpineObjectData37.cs +++ b/Spine/Implementations/V37/SpineObjectData37.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime37; -using Spine.Implementations.SpineWrappers.V37.Attachments; +using Spine.Implementations.V37.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { [SpineImplementation(3, 7)] internal sealed class SpineObjectData37 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V37 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData37(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData37(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V37/TrackEntry37.cs b/Spine/Implementations/V37/TrackEntry37.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V37/TrackEntry37.cs rename to Spine/Implementations/V37/TrackEntry37.cs index cf1c90e..418b6db 100644 --- a/Spine/Implementations/SpineWrappers/V37/TrackEntry37.cs +++ b/Spine/Implementations/V37/TrackEntry37.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime37; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V37 +namespace Spine.Implementations.V37 { internal sealed class TrackEntry37(TrackEntry innerObject, AnimationState37 animationState, SpineObjectData37 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V37 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V38/Animation38.cs b/Spine/Implementations/V38/Animation38.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V38/Animation38.cs rename to Spine/Implementations/V38/Animation38.cs index 5b05e73..051449e 100644 --- a/Spine/Implementations/SpineWrappers/V38/Animation38.cs +++ b/Spine/Implementations/V38/Animation38.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime38; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class Animation38(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V38/AnimationState38.cs b/Spine/Implementations/V38/AnimationState38.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V38/AnimationState38.cs rename to Spine/Implementations/V38/AnimationState38.cs index db83d08..c239ac4 100644 --- a/Spine/Implementations/SpineWrappers/V38/AnimationState38.cs +++ b/Spine/Implementations/V38/AnimationState38.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime38; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class AnimationState38(AnimationState innerObject, SpineObjectData38 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/Attachment38.cs b/Spine/Implementations/V38/Attachments/Attachment38.cs similarity index 81% rename from Spine/Implementations/SpineWrappers/V38/Attachments/Attachment38.cs rename to Spine/Implementations/V38/Attachments/Attachment38.cs index 277cfbd..1ae5b39 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/Attachment38.cs +++ b/Spine/Implementations/V38/Attachments/Attachment38.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal abstract class Attachment38(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/BoundingBoxAttachment38.cs b/Spine/Implementations/V38/Attachments/BoundingBoxAttachment38.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V38/Attachments/BoundingBoxAttachment38.cs rename to Spine/Implementations/V38/Attachments/BoundingBoxAttachment38.cs index 4ce6da8..923b5af 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/BoundingBoxAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/BoundingBoxAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class BoundingBoxAttachment38(BoundingBoxAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/ClippingAttachment38.cs b/Spine/Implementations/V38/Attachments/ClippingAttachment38.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V38/Attachments/ClippingAttachment38.cs rename to Spine/Implementations/V38/Attachments/ClippingAttachment38.cs index ef75ecb..8dee594 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/ClippingAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/ClippingAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class ClippingAttachment38(ClippingAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/MeshAttachment38.cs b/Spine/Implementations/V38/Attachments/MeshAttachment38.cs similarity index 86% rename from Spine/Implementations/SpineWrappers/V38/Attachments/MeshAttachment38.cs rename to Spine/Implementations/V38/Attachments/MeshAttachment38.cs index 46bd51e..4ce3109 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/MeshAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/MeshAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class MeshAttachment38(MeshAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/PathAttachment38.cs b/Spine/Implementations/V38/Attachments/PathAttachment38.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V38/Attachments/PathAttachment38.cs rename to Spine/Implementations/V38/Attachments/PathAttachment38.cs index ef908f8..d0636ae 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/PathAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/PathAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class PathAttachment38(PathAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/PointAttachment38.cs b/Spine/Implementations/V38/Attachments/PointAttachment38.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V38/Attachments/PointAttachment38.cs rename to Spine/Implementations/V38/Attachments/PointAttachment38.cs index 3d1c80c..84e3c62 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/PointAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/PointAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class PointAttachment38(PointAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Attachments/RegionAttachment38.cs b/Spine/Implementations/V38/Attachments/RegionAttachment38.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V38/Attachments/RegionAttachment38.cs rename to Spine/Implementations/V38/Attachments/RegionAttachment38.cs index 5d901f6..2ea4526 100644 --- a/Spine/Implementations/SpineWrappers/V38/Attachments/RegionAttachment38.cs +++ b/Spine/Implementations/V38/Attachments/RegionAttachment38.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V38; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -namespace Spine.Implementations.SpineWrappers.V38.Attachments +namespace Spine.Implementations.V38.Attachments { internal sealed class RegionAttachment38(RegionAttachment innerObject) : Attachment38(innerObject), @@ -17,7 +19,7 @@ namespace Spine.Implementations.SpineWrappers.V38.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot38 st) { diff --git a/Spine/Implementations/SpineWrappers/V38/Bone38.cs b/Spine/Implementations/V38/Bone38.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V38/Bone38.cs rename to Spine/Implementations/V38/Bone38.cs index 6b49878..799b2cf 100644 --- a/Spine/Implementations/SpineWrappers/V38/Bone38.cs +++ b/Spine/Implementations/V38/Bone38.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime38; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class Bone38(Bone innerObject, Bone38? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V38/Skeleton38.cs b/Spine/Implementations/V38/Skeleton38.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V38/Skeleton38.cs rename to Spine/Implementations/V38/Skeleton38.cs index 7b11cdb..9990955 100644 --- a/Spine/Implementations/SpineWrappers/V38/Skeleton38.cs +++ b/Spine/Implementations/V38/Skeleton38.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime38; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class Skeleton38 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V38 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V38/SkeletonClipping38.cs b/Spine/Implementations/V38/SkeletonClipping38.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V38/SkeletonClipping38.cs rename to Spine/Implementations/V38/SkeletonClipping38.cs index c3e07dd..a5d7eca 100644 --- a/Spine/Implementations/SpineWrappers/V38/SkeletonClipping38.cs +++ b/Spine/Implementations/V38/SkeletonClipping38.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime38; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class SkeletonClipping38 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V38/Skin38.cs b/Spine/Implementations/V38/Skin38.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V38/Skin38.cs rename to Spine/Implementations/V38/Skin38.cs index 77af872..8571827 100644 --- a/Spine/Implementations/SpineWrappers/V38/Skin38.cs +++ b/Spine/Implementations/V38/Skin38.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime38; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class Skin38 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V38/Slot38.cs b/Spine/Implementations/V38/Slot38.cs similarity index 94% rename from Spine/Implementations/SpineWrappers/V38/Slot38.cs rename to Spine/Implementations/V38/Slot38.cs index 6255fca..ae5ac73 100644 --- a/Spine/Implementations/SpineWrappers/V38/Slot38.cs +++ b/Spine/Implementations/V38/Slot38.cs @@ -5,11 +5,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime38; using SpineRuntime38.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class Slot38 : ISlot { @@ -47,7 +48,7 @@ namespace Spine.Implementations.SpineWrappers.V38 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V38/SpineObjectData38.cs b/Spine/Implementations/V38/SpineObjectData38.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V38/SpineObjectData38.cs rename to Spine/Implementations/V38/SpineObjectData38.cs index 45265e8..680d43c 100644 --- a/Spine/Implementations/SpineWrappers/V38/SpineObjectData38.cs +++ b/Spine/Implementations/V38/SpineObjectData38.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime38; using SpineRuntime38.Attachments; -using Spine.Implementations.SpineWrappers.V38.Attachments; +using Spine.Implementations.V38.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { [SpineImplementation(3, 8)] internal sealed class SpineObjectData38 : SpineObjectData @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V38 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData38(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData38(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V38/TrackEntry38.cs b/Spine/Implementations/V38/TrackEntry38.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V38/TrackEntry38.cs rename to Spine/Implementations/V38/TrackEntry38.cs index 48f8822..ba77d78 100644 --- a/Spine/Implementations/SpineWrappers/V38/TrackEntry38.cs +++ b/Spine/Implementations/V38/TrackEntry38.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime38; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V38 +namespace Spine.Implementations.V38 { internal sealed class TrackEntry38(TrackEntry innerObject, AnimationState38 animationState, SpineObjectData38 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V38 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V40/Animation40.cs b/Spine/Implementations/V40/Animation40.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V40/Animation40.cs rename to Spine/Implementations/V40/Animation40.cs index 5198441..39a6c87 100644 --- a/Spine/Implementations/SpineWrappers/V40/Animation40.cs +++ b/Spine/Implementations/V40/Animation40.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime40; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class Animation40(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V40/AnimationState40.cs b/Spine/Implementations/V40/AnimationState40.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V40/AnimationState40.cs rename to Spine/Implementations/V40/AnimationState40.cs index e9d12ca..7aadee6 100644 --- a/Spine/Implementations/SpineWrappers/V40/AnimationState40.cs +++ b/Spine/Implementations/V40/AnimationState40.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class AnimationState40(AnimationState innerObject, SpineObjectData40 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/Attachment40.cs b/Spine/Implementations/V40/Attachments/Attachment40.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V40/Attachments/Attachment40.cs rename to Spine/Implementations/V40/Attachments/Attachment40.cs index 9241919..095218d 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/Attachment40.cs +++ b/Spine/Implementations/V40/Attachments/Attachment40.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal abstract class Attachment40(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/BoundingBoxAttachment40.cs b/Spine/Implementations/V40/Attachments/BoundingBoxAttachment40.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V40/Attachments/BoundingBoxAttachment40.cs rename to Spine/Implementations/V40/Attachments/BoundingBoxAttachment40.cs index 23b6043..14b7897 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/BoundingBoxAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/BoundingBoxAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class BoundingBoxAttachment40(BoundingBoxAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/ClippingAttachment40.cs b/Spine/Implementations/V40/Attachments/ClippingAttachment40.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V40/Attachments/ClippingAttachment40.cs rename to Spine/Implementations/V40/Attachments/ClippingAttachment40.cs index 5ce1e20..63e095d 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/ClippingAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/ClippingAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class ClippingAttachment40(ClippingAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/MeshAttachment40.cs b/Spine/Implementations/V40/Attachments/MeshAttachment40.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V40/Attachments/MeshAttachment40.cs rename to Spine/Implementations/V40/Attachments/MeshAttachment40.cs index d32f730..86e05b3 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/MeshAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/MeshAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class MeshAttachment40(MeshAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/PathAttachment40.cs b/Spine/Implementations/V40/Attachments/PathAttachment40.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V40/Attachments/PathAttachment40.cs rename to Spine/Implementations/V40/Attachments/PathAttachment40.cs index 7636c0f..2046048 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/PathAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/PathAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class PathAttachment40(PathAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/PointAttachment40.cs b/Spine/Implementations/V40/Attachments/PointAttachment40.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V40/Attachments/PointAttachment40.cs rename to Spine/Implementations/V40/Attachments/PointAttachment40.cs index d844f82..74f6348 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/PointAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/PointAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class PointAttachment40(PointAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Attachments/RegionAttachment40.cs b/Spine/Implementations/V40/Attachments/RegionAttachment40.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V40/Attachments/RegionAttachment40.cs rename to Spine/Implementations/V40/Attachments/RegionAttachment40.cs index e514c50..1d8d7b8 100644 --- a/Spine/Implementations/SpineWrappers/V40/Attachments/RegionAttachment40.cs +++ b/Spine/Implementations/V40/Attachments/RegionAttachment40.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40.Attachments +namespace Spine.Implementations.V40.Attachments { internal sealed class RegionAttachment40(RegionAttachment innerObject) : Attachment40(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V40.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot40 st) { diff --git a/Spine/Implementations/SpineWrappers/V40/Bone40.cs b/Spine/Implementations/V40/Bone40.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V40/Bone40.cs rename to Spine/Implementations/V40/Bone40.cs index cfb8818..6fe2def 100644 --- a/Spine/Implementations/SpineWrappers/V40/Bone40.cs +++ b/Spine/Implementations/V40/Bone40.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class Bone40(Bone innerObject, Bone40? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V40/Skeleton40.cs b/Spine/Implementations/V40/Skeleton40.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V40/Skeleton40.cs rename to Spine/Implementations/V40/Skeleton40.cs index ec4b055..38b4c16 100644 --- a/Spine/Implementations/SpineWrappers/V40/Skeleton40.cs +++ b/Spine/Implementations/V40/Skeleton40.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime40; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class Skeleton40 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V40 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V40/SkeletonClipping40.cs b/Spine/Implementations/V40/SkeletonClipping40.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V40/SkeletonClipping40.cs rename to Spine/Implementations/V40/SkeletonClipping40.cs index ff334f9..0691d4c 100644 --- a/Spine/Implementations/SpineWrappers/V40/SkeletonClipping40.cs +++ b/Spine/Implementations/V40/SkeletonClipping40.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime40; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class SkeletonClipping40 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V40/Skin40.cs b/Spine/Implementations/V40/Skin40.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V40/Skin40.cs rename to Spine/Implementations/V40/Skin40.cs index d656154..29bd14e 100644 --- a/Spine/Implementations/SpineWrappers/V40/Skin40.cs +++ b/Spine/Implementations/V40/Skin40.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime40; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class Skin40 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V40/Slot40.cs b/Spine/Implementations/V40/Slot40.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V40/Slot40.cs rename to Spine/Implementations/V40/Slot40.cs index 14f703d..26e8ebe 100644 --- a/Spine/Implementations/SpineWrappers/V40/Slot40.cs +++ b/Spine/Implementations/V40/Slot40.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime40; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class Slot40 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V40 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V40/SpineObjectData40.cs b/Spine/Implementations/V40/SpineObjectData40.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V40/SpineObjectData40.cs rename to Spine/Implementations/V40/SpineObjectData40.cs index 6014619..b02a489 100644 --- a/Spine/Implementations/SpineWrappers/V40/SpineObjectData40.cs +++ b/Spine/Implementations/V40/SpineObjectData40.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime40; -using Spine.Implementations.SpineWrappers.V40.Attachments; +using Spine.Implementations.V40.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { [SpineImplementation(4, 0)] internal sealed class SpineObjectData40 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V40 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData40(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData40(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V40/TrackEntry40.cs b/Spine/Implementations/V40/TrackEntry40.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V40/TrackEntry40.cs rename to Spine/Implementations/V40/TrackEntry40.cs index 8fe5cda..a407d09 100644 --- a/Spine/Implementations/SpineWrappers/V40/TrackEntry40.cs +++ b/Spine/Implementations/V40/TrackEntry40.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime40; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V40 +namespace Spine.Implementations.V40 { internal sealed class TrackEntry40(TrackEntry innerObject, AnimationState40 animationState, SpineObjectData40 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V40 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V41/Animation41.cs b/Spine/Implementations/V41/Animation41.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V41/Animation41.cs rename to Spine/Implementations/V41/Animation41.cs index 928bab4..085442f 100644 --- a/Spine/Implementations/SpineWrappers/V41/Animation41.cs +++ b/Spine/Implementations/V41/Animation41.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime41; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class Animation41(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V41/AnimationState41.cs b/Spine/Implementations/V41/AnimationState41.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V41/AnimationState41.cs rename to Spine/Implementations/V41/AnimationState41.cs index e5b658a..d76f7d8 100644 --- a/Spine/Implementations/SpineWrappers/V41/AnimationState41.cs +++ b/Spine/Implementations/V41/AnimationState41.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class AnimationState41(AnimationState innerObject, SpineObjectData41 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/Attachment41.cs b/Spine/Implementations/V41/Attachments/Attachment41.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V41/Attachments/Attachment41.cs rename to Spine/Implementations/V41/Attachments/Attachment41.cs index 2b0c6c2..9897103 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/Attachment41.cs +++ b/Spine/Implementations/V41/Attachments/Attachment41.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal abstract class Attachment41(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/BoundingBoxAttachment41.cs b/Spine/Implementations/V41/Attachments/BoundingBoxAttachment41.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V41/Attachments/BoundingBoxAttachment41.cs rename to Spine/Implementations/V41/Attachments/BoundingBoxAttachment41.cs index 9ce42b7..534b2dc 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/BoundingBoxAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/BoundingBoxAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class BoundingBoxAttachment41(BoundingBoxAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/ClippingAttachment41.cs b/Spine/Implementations/V41/Attachments/ClippingAttachment41.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V41/Attachments/ClippingAttachment41.cs rename to Spine/Implementations/V41/Attachments/ClippingAttachment41.cs index 4b97e3b..d5db2d0 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/ClippingAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/ClippingAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class ClippingAttachment41(ClippingAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/MeshAttachment41.cs b/Spine/Implementations/V41/Attachments/MeshAttachment41.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V41/Attachments/MeshAttachment41.cs rename to Spine/Implementations/V41/Attachments/MeshAttachment41.cs index 187e3a7..fddb477 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/MeshAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/MeshAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class MeshAttachment41(MeshAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/PathAttachment41.cs b/Spine/Implementations/V41/Attachments/PathAttachment41.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V41/Attachments/PathAttachment41.cs rename to Spine/Implementations/V41/Attachments/PathAttachment41.cs index 4f03609..36d6881 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/PathAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/PathAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class PathAttachment41(PathAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/PointAttachment41.cs b/Spine/Implementations/V41/Attachments/PointAttachment41.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V41/Attachments/PointAttachment41.cs rename to Spine/Implementations/V41/Attachments/PointAttachment41.cs index 27ebbcf..1283c01 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/PointAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/PointAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class PointAttachment41(PointAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Attachments/RegionAttachment41.cs b/Spine/Implementations/V41/Attachments/RegionAttachment41.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V41/Attachments/RegionAttachment41.cs rename to Spine/Implementations/V41/Attachments/RegionAttachment41.cs index d61f43d..56f934f 100644 --- a/Spine/Implementations/SpineWrappers/V41/Attachments/RegionAttachment41.cs +++ b/Spine/Implementations/V41/Attachments/RegionAttachment41.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41.Attachments +namespace Spine.Implementations.V41.Attachments { internal sealed class RegionAttachment41(RegionAttachment innerObject) : Attachment41(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V41.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot41 st) { diff --git a/Spine/Implementations/SpineWrappers/V41/Bone41.cs b/Spine/Implementations/V41/Bone41.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V41/Bone41.cs rename to Spine/Implementations/V41/Bone41.cs index 25a45cc..dedff12 100644 --- a/Spine/Implementations/SpineWrappers/V41/Bone41.cs +++ b/Spine/Implementations/V41/Bone41.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class Bone41(Bone innerObject, Bone41? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V41/Skeleton41.cs b/Spine/Implementations/V41/Skeleton41.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V41/Skeleton41.cs rename to Spine/Implementations/V41/Skeleton41.cs index 994139a..cf3187f 100644 --- a/Spine/Implementations/SpineWrappers/V41/Skeleton41.cs +++ b/Spine/Implementations/V41/Skeleton41.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime41; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class Skeleton41 : ISkeleton { @@ -95,12 +95,6 @@ namespace Spine.Implementations.SpineWrappers.V41 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) { } // 4.1 没有 Update 方法 - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V41/SkeletonClipping41.cs b/Spine/Implementations/V41/SkeletonClipping41.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V41/SkeletonClipping41.cs rename to Spine/Implementations/V41/SkeletonClipping41.cs index b9714fb..1d7f74c 100644 --- a/Spine/Implementations/SpineWrappers/V41/SkeletonClipping41.cs +++ b/Spine/Implementations/V41/SkeletonClipping41.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime41; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class SkeletonClipping41 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V41/Skin41.cs b/Spine/Implementations/V41/Skin41.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V41/Skin41.cs rename to Spine/Implementations/V41/Skin41.cs index b5acacf..686edb4 100644 --- a/Spine/Implementations/SpineWrappers/V41/Skin41.cs +++ b/Spine/Implementations/V41/Skin41.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime41; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class Skin41 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V41/Slot41.cs b/Spine/Implementations/V41/Slot41.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V41/Slot41.cs rename to Spine/Implementations/V41/Slot41.cs index 9ddd689..58f3037 100644 --- a/Spine/Implementations/SpineWrappers/V41/Slot41.cs +++ b/Spine/Implementations/V41/Slot41.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime41; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class Slot41 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V41 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V41/SpineObjectData41.cs b/Spine/Implementations/V41/SpineObjectData41.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V41/SpineObjectData41.cs rename to Spine/Implementations/V41/SpineObjectData41.cs index 259655f..25ede0d 100644 --- a/Spine/Implementations/SpineWrappers/V41/SpineObjectData41.cs +++ b/Spine/Implementations/V41/SpineObjectData41.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime41; -using Spine.Implementations.SpineWrappers.V41.Attachments; +using Spine.Implementations.V41.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { [SpineImplementation(4, 1)] internal sealed class SpineObjectData41 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V41 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData41(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData41(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V41/TrackEntry41.cs b/Spine/Implementations/V41/TrackEntry41.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V41/TrackEntry41.cs rename to Spine/Implementations/V41/TrackEntry41.cs index ca359a7..db75f63 100644 --- a/Spine/Implementations/SpineWrappers/V41/TrackEntry41.cs +++ b/Spine/Implementations/V41/TrackEntry41.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime41; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V41 +namespace Spine.Implementations.V41 { internal sealed class TrackEntry41(TrackEntry innerObject, AnimationState41 animationState, SpineObjectData41 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V41 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V42/Animation42.cs b/Spine/Implementations/V42/Animation42.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V42/Animation42.cs rename to Spine/Implementations/V42/Animation42.cs index d16e0db..58bbe57 100644 --- a/Spine/Implementations/SpineWrappers/V42/Animation42.cs +++ b/Spine/Implementations/V42/Animation42.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime42; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class Animation42(Animation innerObject) : IAnimation { diff --git a/Spine/Implementations/SpineWrappers/V42/AnimationState42.cs b/Spine/Implementations/V42/AnimationState42.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V42/AnimationState42.cs rename to Spine/Implementations/V42/AnimationState42.cs index 9909848..0e8b046 100644 --- a/Spine/Implementations/SpineWrappers/V42/AnimationState42.cs +++ b/Spine/Implementations/V42/AnimationState42.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class AnimationState42(AnimationState innerObject, SpineObjectData42 data) : IAnimationState { @@ -27,7 +27,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -56,7 +56,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -85,7 +85,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -114,7 +114,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -143,7 +143,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/Attachment42.cs b/Spine/Implementations/V42/Attachments/Attachment42.cs similarity index 80% rename from Spine/Implementations/SpineWrappers/V42/Attachments/Attachment42.cs rename to Spine/Implementations/V42/Attachments/Attachment42.cs index 9ab0208..c3596bd 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/Attachment42.cs +++ b/Spine/Implementations/V42/Attachments/Attachment42.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal abstract class Attachment42(Attachment innerObject) : IAttachment { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/BoundingBoxAttachment42.cs b/Spine/Implementations/V42/Attachments/BoundingBoxAttachment42.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V42/Attachments/BoundingBoxAttachment42.cs rename to Spine/Implementations/V42/Attachments/BoundingBoxAttachment42.cs index 9b15c9b..b823588 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/BoundingBoxAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/BoundingBoxAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class BoundingBoxAttachment42(BoundingBoxAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override BoundingBoxAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/ClippingAttachment42.cs b/Spine/Implementations/V42/Attachments/ClippingAttachment42.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V42/Attachments/ClippingAttachment42.cs rename to Spine/Implementations/V42/Attachments/ClippingAttachment42.cs index c6430df..9bebfb3 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/ClippingAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/ClippingAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class ClippingAttachment42(ClippingAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override ClippingAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/MeshAttachment42.cs b/Spine/Implementations/V42/Attachments/MeshAttachment42.cs similarity index 85% rename from Spine/Implementations/SpineWrappers/V42/Attachments/MeshAttachment42.cs rename to Spine/Implementations/V42/Attachments/MeshAttachment42.cs index 93b230e..f635061 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/MeshAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/MeshAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class MeshAttachment42(MeshAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override MeshAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/PathAttachment42.cs b/Spine/Implementations/V42/Attachments/PathAttachment42.cs similarity index 79% rename from Spine/Implementations/SpineWrappers/V42/Attachments/PathAttachment42.cs rename to Spine/Implementations/V42/Attachments/PathAttachment42.cs index af80ae1..b8d5f0b 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/PathAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/PathAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class PathAttachment42(PathAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override PathAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/PointAttachment42.cs b/Spine/Implementations/V42/Attachments/PointAttachment42.cs similarity index 78% rename from Spine/Implementations/SpineWrappers/V42/Attachments/PointAttachment42.cs rename to Spine/Implementations/V42/Attachments/PointAttachment42.cs index 2570f55..204baa2 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/PointAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/PointAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class PointAttachment42(PointAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override PointAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Attachments/RegionAttachment42.cs b/Spine/Implementations/V42/Attachments/RegionAttachment42.cs similarity index 84% rename from Spine/Implementations/SpineWrappers/V42/Attachments/RegionAttachment42.cs rename to Spine/Implementations/V42/Attachments/RegionAttachment42.cs index 9f3c762..364b205 100644 --- a/Spine/Implementations/SpineWrappers/V42/Attachments/RegionAttachment42.cs +++ b/Spine/Implementations/V42/Attachments/RegionAttachment42.cs @@ -3,10 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations.V42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42.Attachments +namespace Spine.Implementations.V42.Attachments { internal sealed class RegionAttachment42(RegionAttachment innerObject) : Attachment42(innerObject), @@ -16,7 +18,7 @@ namespace Spine.Implementations.SpineWrappers.V42.Attachments public override RegionAttachment InnerObject => _o; - public override int ComputeWorldVertices(Spine.SpineWrappers.ISlot slot, ref float[] worldVertices) + public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices) { if (slot is Slot42 st) { diff --git a/Spine/Implementations/SpineWrappers/V42/Bone42.cs b/Spine/Implementations/V42/Bone42.cs similarity index 91% rename from Spine/Implementations/SpineWrappers/V42/Bone42.cs rename to Spine/Implementations/V42/Bone42.cs index 5525eb7..ad203d1 100644 --- a/Spine/Implementations/SpineWrappers/V42/Bone42.cs +++ b/Spine/Implementations/V42/Bone42.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class Bone42(Bone innerObject, Bone42? parent = null) : IBone { diff --git a/Spine/Implementations/SpineWrappers/V42/Skeleton42.cs b/Spine/Implementations/V42/Skeleton42.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V42/Skeleton42.cs rename to Spine/Implementations/V42/Skeleton42.cs index 9866c1c..a69434c 100644 --- a/Spine/Implementations/SpineWrappers/V42/Skeleton42.cs +++ b/Spine/Implementations/V42/Skeleton42.cs @@ -5,10 +5,10 @@ using System.Text; using System.Threading.Tasks; using System.Collections.Frozen; using System.Collections.Immutable; -using Spine.SpineWrappers; using SpineRuntime42; +using Spine.Interfaces; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class Skeleton42 : ISkeleton { @@ -103,12 +103,6 @@ namespace Spine.Implementations.SpineWrappers.V42 public void SetSlotsToSetupPose() => _o.SetSlotsToSetupPose(); public void Update(float delta) => _o.Update(delta); - public void GetBounds(out float x, out float y, out float w, out float h) - { - float[] _ = []; - _o.GetBounds(out x, out y, out w, out h, ref _); - } - public override string ToString() => _o.ToString(); } } diff --git a/Spine/Implementations/SpineWrappers/V42/SkeletonClipping42.cs b/Spine/Implementations/V42/SkeletonClipping42.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V42/SkeletonClipping42.cs rename to Spine/Implementations/V42/SkeletonClipping42.cs index d4763d7..cf47204 100644 --- a/Spine/Implementations/SpineWrappers/V42/SkeletonClipping42.cs +++ b/Spine/Implementations/V42/SkeletonClipping42.cs @@ -1,5 +1,5 @@ -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using SpineRuntime42; using System; @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class SkeletonClipping42 : ISkeletonClipping { diff --git a/Spine/Implementations/SpineWrappers/V42/Skin42.cs b/Spine/Implementations/V42/Skin42.cs similarity index 92% rename from Spine/Implementations/SpineWrappers/V42/Skin42.cs rename to Spine/Implementations/V42/Skin42.cs index 560039e..337e2d5 100644 --- a/Spine/Implementations/SpineWrappers/V42/Skin42.cs +++ b/Spine/Implementations/V42/Skin42.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime42; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class Skin42 : ISkin { diff --git a/Spine/Implementations/SpineWrappers/V42/Slot42.cs b/Spine/Implementations/V42/Slot42.cs similarity index 93% rename from Spine/Implementations/SpineWrappers/V42/Slot42.cs rename to Spine/Implementations/V42/Slot42.cs index 283c011..f27af17 100644 --- a/Spine/Implementations/SpineWrappers/V42/Slot42.cs +++ b/Spine/Implementations/V42/Slot42.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; using SpineRuntime42; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class Slot42 : ISlot { @@ -46,7 +47,7 @@ namespace Spine.Implementations.SpineWrappers.V42 public float A { get => _o.A; set => _o.A = value; } public IBone Bone => _bone; - public Spine.SpineWrappers.Attachments.IAttachment? Attachment + public IAttachment? Attachment { get { diff --git a/Spine/Implementations/SpineWrappers/V42/SpineObjectData42.cs b/Spine/Implementations/V42/SpineObjectData42.cs similarity index 96% rename from Spine/Implementations/SpineWrappers/V42/SpineObjectData42.cs rename to Spine/Implementations/V42/SpineObjectData42.cs index fb1d19f..95afa35 100644 --- a/Spine/Implementations/SpineWrappers/V42/SpineObjectData42.cs +++ b/Spine/Implementations/V42/SpineObjectData42.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Spine.Utils; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; using SpineRuntime42; -using Spine.Implementations.SpineWrappers.V42.Attachments; +using Spine.Implementations.V42.Attachments; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { [SpineImplementation(4, 2)] internal sealed class SpineObjectData42 : SpineObjectData @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V42 private readonly ImmutableArray _animations; private readonly FrozenDictionary _animationsByName; - public SpineObjectData42(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader) + public SpineObjectData42(string skelPath, string atlasPath, TextureLoader textureLoader) : base(skelPath, atlasPath, textureLoader) { // 加载 atlas diff --git a/Spine/Implementations/SpineWrappers/V42/TrackEntry42.cs b/Spine/Implementations/V42/TrackEntry42.cs similarity index 90% rename from Spine/Implementations/SpineWrappers/V42/TrackEntry42.cs rename to Spine/Implementations/V42/TrackEntry42.cs index 5c8e9d6..9ebe9f0 100644 --- a/Spine/Implementations/SpineWrappers/V42/TrackEntry42.cs +++ b/Spine/Implementations/V42/TrackEntry42.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineRuntime42; using System; using System.Collections.Generic; @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.Implementations.SpineWrappers.V42 +namespace Spine.Implementations.V42 { internal sealed class TrackEntry42(TrackEntry innerObject, AnimationState42 animationState, SpineObjectData42 data): ITrackEntry { @@ -26,7 +26,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Start += f; @@ -55,7 +55,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Interrupt += f; @@ -84,7 +84,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.End += f; @@ -113,7 +113,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Complete += f; @@ -142,7 +142,7 @@ namespace Spine.Implementations.SpineWrappers.V42 if (value is null) return; if (!_eventMapping.TryGetValue(value, out var f)) { - _eventMapping[value] = f = (TrackEntry t) => value(_animationState.GetTrackEntry(t)); + _eventMapping[value] = f = (t) => value(_animationState.GetTrackEntry(t)); _eventCount[value] = 0; } _o.Dispose += f; diff --git a/Spine/SpineWrappers/Attachments/IAttachment.cs b/Spine/Interfaces/Attachments/IAttachment.cs similarity index 90% rename from Spine/SpineWrappers/Attachments/IAttachment.cs rename to Spine/Interfaces/Attachments/IAttachment.cs index 31a42d5..3b661fe 100644 --- a/Spine/SpineWrappers/Attachments/IAttachment.cs +++ b/Spine/Interfaces/Attachments/IAttachment.cs @@ -1,10 +1,11 @@ -using System; +using Spine.Interfaces; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IBoundingBoxAttachment.cs b/Spine/Interfaces/Attachments/IBoundingBoxAttachment.cs similarity index 82% rename from Spine/SpineWrappers/Attachments/IBoundingBoxAttachment.cs rename to Spine/Interfaces/Attachments/IBoundingBoxAttachment.cs index 8c702bb..7b618d4 100644 --- a/Spine/SpineWrappers/Attachments/IBoundingBoxAttachment.cs +++ b/Spine/Interfaces/Attachments/IBoundingBoxAttachment.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IBoundingBoxAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IClippingAttachment.cs b/Spine/Interfaces/Attachments/IClippingAttachment.cs similarity index 82% rename from Spine/SpineWrappers/Attachments/IClippingAttachment.cs rename to Spine/Interfaces/Attachments/IClippingAttachment.cs index dbc0880..331ffe8 100644 --- a/Spine/SpineWrappers/Attachments/IClippingAttachment.cs +++ b/Spine/Interfaces/Attachments/IClippingAttachment.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IClippingAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IMeshAttachment.cs b/Spine/Interfaces/Attachments/IMeshAttachment.cs similarity index 94% rename from Spine/SpineWrappers/Attachments/IMeshAttachment.cs rename to Spine/Interfaces/Attachments/IMeshAttachment.cs index 13ee207..d4462fd 100644 --- a/Spine/SpineWrappers/Attachments/IMeshAttachment.cs +++ b/Spine/Interfaces/Attachments/IMeshAttachment.cs @@ -1,10 +1,11 @@ -using System; +using Spine.Interfaces; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IMeshAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IPathAttachment.cs b/Spine/Interfaces/Attachments/IPathAttachment.cs similarity index 81% rename from Spine/SpineWrappers/Attachments/IPathAttachment.cs rename to Spine/Interfaces/Attachments/IPathAttachment.cs index 8c7ff2c..8bb4128 100644 --- a/Spine/SpineWrappers/Attachments/IPathAttachment.cs +++ b/Spine/Interfaces/Attachments/IPathAttachment.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IPathAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IPointAttachment.cs b/Spine/Interfaces/Attachments/IPointAttachment.cs similarity index 81% rename from Spine/SpineWrappers/Attachments/IPointAttachment.cs rename to Spine/Interfaces/Attachments/IPointAttachment.cs index a68a3ab..1217609 100644 --- a/Spine/SpineWrappers/Attachments/IPointAttachment.cs +++ b/Spine/Interfaces/Attachments/IPointAttachment.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IPointAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/IRegionAttachment.cs b/Spine/Interfaces/Attachments/IRegionAttachment.cs similarity index 94% rename from Spine/SpineWrappers/Attachments/IRegionAttachment.cs rename to Spine/Interfaces/Attachments/IRegionAttachment.cs index c9e64d4..12c9412 100644 --- a/Spine/SpineWrappers/Attachments/IRegionAttachment.cs +++ b/Spine/Interfaces/Attachments/IRegionAttachment.cs @@ -1,10 +1,11 @@ -using System; +using Spine.Interfaces; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface IRegionAttachment : IAttachment { diff --git a/Spine/SpineWrappers/Attachments/ISkinnedMeshAttachment.cs b/Spine/Interfaces/Attachments/ISkinnedMeshAttachment.cs similarity index 94% rename from Spine/SpineWrappers/Attachments/ISkinnedMeshAttachment.cs rename to Spine/Interfaces/Attachments/ISkinnedMeshAttachment.cs index a54c276..169e535 100644 --- a/Spine/SpineWrappers/Attachments/ISkinnedMeshAttachment.cs +++ b/Spine/Interfaces/Attachments/ISkinnedMeshAttachment.cs @@ -1,10 +1,11 @@ -using System; +using Spine.Interfaces; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers.Attachments +namespace Spine.Interfaces.Attachments { public interface ISkinnedMeshAttachment : IAttachment { diff --git a/Spine/SpineWrappers/IAnimation.cs b/Spine/Interfaces/IAnimation.cs similarity index 92% rename from Spine/SpineWrappers/IAnimation.cs rename to Spine/Interfaces/IAnimation.cs index 9dd8858..2062833 100644 --- a/Spine/SpineWrappers/IAnimation.cs +++ b/Spine/Interfaces/IAnimation.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface IAnimation { diff --git a/Spine/SpineWrappers/IAnimationState.cs b/Spine/Interfaces/IAnimationState.cs similarity index 99% rename from Spine/SpineWrappers/IAnimationState.cs rename to Spine/Interfaces/IAnimationState.cs index 94c4c0f..edea63e 100644 --- a/Spine/SpineWrappers/IAnimationState.cs +++ b/Spine/Interfaces/IAnimationState.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface IAnimationState { diff --git a/Spine/SpineWrappers/IBone.cs b/Spine/Interfaces/IBone.cs similarity index 97% rename from Spine/SpineWrappers/IBone.cs rename to Spine/Interfaces/IBone.cs index e8dea1c..05fa220 100644 --- a/Spine/SpineWrappers/IBone.cs +++ b/Spine/Interfaces/IBone.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface IBone { diff --git a/Spine/SpineWrappers/ISkeleton.cs b/Spine/Interfaces/ISkeleton.cs similarity index 93% rename from Spine/SpineWrappers/ISkeleton.cs rename to Spine/Interfaces/ISkeleton.cs index 4ad2dad..d2cc362 100644 --- a/Spine/SpineWrappers/ISkeleton.cs +++ b/Spine/Interfaces/ISkeleton.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface ISkeleton { @@ -114,10 +114,5 @@ namespace Spine.SpineWrappers /// 更新时间 /// public void Update(float delta); - - /// - /// 获取当前状态包围盒 - /// - public void GetBounds(out float x, out float y, out float w, out float h); } } diff --git a/Spine/SpineWrappers/ISkeletonClipping.cs b/Spine/Interfaces/ISkeletonClipping.cs similarity index 95% rename from Spine/SpineWrappers/ISkeletonClipping.cs rename to Spine/Interfaces/ISkeletonClipping.cs index d5dbe97..03ea138 100644 --- a/Spine/SpineWrappers/ISkeletonClipping.cs +++ b/Spine/Interfaces/ISkeletonClipping.cs @@ -1,11 +1,11 @@ -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces.Attachments; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface ISkeletonClipping { diff --git a/Spine/SpineWrappers/ISkin.cs b/Spine/Interfaces/ISkin.cs similarity index 94% rename from Spine/SpineWrappers/ISkin.cs rename to Spine/Interfaces/ISkin.cs index 07b2c0f..70d2d5c 100644 --- a/Spine/SpineWrappers/ISkin.cs +++ b/Spine/Interfaces/ISkin.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface ISkin { diff --git a/Spine/SpineWrappers/ISlot.cs b/Spine/Interfaces/ISlot.cs similarity index 94% rename from Spine/SpineWrappers/ISlot.cs rename to Spine/Interfaces/ISlot.cs index 27ac9ac..17ac84b 100644 --- a/Spine/SpineWrappers/ISlot.cs +++ b/Spine/Interfaces/ISlot.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces.Attachments; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface ISlot { @@ -58,5 +58,6 @@ namespace Spine.SpineWrappers /// 是否已禁用渲染该插槽 /// public bool Disabled { get; set; } + } } diff --git a/Spine/SpineWrappers/ISpineObjectData.cs b/Spine/Interfaces/ISpineObjectData.cs similarity index 95% rename from Spine/SpineWrappers/ISpineObjectData.cs rename to Spine/Interfaces/ISpineObjectData.cs index cc5d75d..288eb72 100644 --- a/Spine/SpineWrappers/ISpineObjectData.cs +++ b/Spine/Interfaces/ISpineObjectData.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers.Attachments; +using Spine.Interfaces.Attachments; using System; using System.Collections.Frozen; using System.Collections.Generic; @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { /// /// 对 SkeletonData 和 AnimationStateData 的访问封装 diff --git a/Spine/SpineWrappers/ITrackEntry.cs b/Spine/Interfaces/ITrackEntry.cs similarity index 98% rename from Spine/SpineWrappers/ITrackEntry.cs rename to Spine/Interfaces/ITrackEntry.cs index 69bee2e..39922bc 100644 --- a/Spine/SpineWrappers/ITrackEntry.cs +++ b/Spine/Interfaces/ITrackEntry.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { public interface ITrackEntry { diff --git a/Spine/Interfaces/SpineExtension.cs b/Spine/Interfaces/SpineExtension.cs new file mode 100644 index 0000000..751a391 --- /dev/null +++ b/Spine/Interfaces/SpineExtension.cs @@ -0,0 +1,122 @@ +using Spine.Interfaces.Attachments; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Spine.Interfaces +{ + public static class SpineExtension + { + /// + /// 获取当前状态包围盒 + /// + public static void GetBounds(this ISlot self, out float x, out float y, out float w, out float h) + { + float[] vertices = new float[8]; + int verticesLength = 0; + var attachment = self.Attachment; + switch (attachment) + { + case IRegionAttachment: + case IMeshAttachment: + verticesLength = attachment.ComputeWorldVertices(self, ref vertices); + break; + default: + break; + } + + if (verticesLength > 0) + { + float minX = int.MaxValue; + float minY = int.MaxValue; + float maxX = int.MinValue; + float maxY = int.MinValue; + for (int ii = 0; ii + 1 < verticesLength; ii += 2) + { + float vx = vertices[ii]; + float vy = vertices[ii + 1]; + minX = Math.Min(minX, vx); + minY = Math.Min(minY, vy); + maxX = Math.Max(maxX, vx); + maxY = Math.Max(maxY, vy); + } + x = minX; + y = minY; + w = maxX - minX; + h = maxY - minY; + } + else + { + x = self.Bone.WorldX; + y = self.Bone.WorldY; + w = 0; + h = 0; + } + } + + /// + /// 命中测试, 当插槽全透明或者处于禁用或者骨骼处于未激活则无法命中 + /// + public static bool HitTest(this ISlot self, float x, float y) + { + if (self.A <= 0 || !self.Bone.Active || self.Disabled) + return false; + + self.GetBounds(out var bx, out var by, out var bw, out var bh); + return x >= bx && x <= (bx + bw) && y >= by && y <= (by + bh); + } + + /// + /// 获取当前状态包围盒 + /// + public static void GetBounds(this ISkeleton self, out float x, out float y, out float w, out float h) + { + float minX = int.MaxValue; + float minY = int.MaxValue; + float maxX = int.MinValue; + float maxY = int.MinValue; + foreach (var slot in self.IterDrawOrder()) + { + if (slot.A <= 0 || !slot.Bone.Active || slot.Disabled) + continue; + + float[] vertices = new float[8]; + int verticesLength = 0; + var attachment = slot.Attachment; + switch (attachment) + { + case IRegionAttachment: + case IMeshAttachment: + verticesLength = attachment.ComputeWorldVertices(slot, ref vertices); + break; + default: + break; + } + + for (int ii = 0; ii + 1 < verticesLength; ii += 2) + { + float vx = vertices[ii]; + float vy = vertices[ii + 1]; + minX = Math.Min(minX, vx); + minY = Math.Min(minY, vy); + maxX = Math.Max(maxX, vx); + maxY = Math.Max(maxY, vy); + } + } + x = minX; + y = minY; + w = maxX - minX; + h = maxY - minY; + } + + /// + /// 逐插槽的命中测试, 不会计算处于禁用或者骨骼未激活的插槽, 比整体包围盒稍微精确一些 + /// + public static bool HitTest(this ISkeleton self, float x, float y) + { + return self.IterDrawOrder().Any(st => st.HitTest(x, y)); + } + } +} diff --git a/Spine/SpineWrappers/SpineObjectData.cs b/Spine/Interfaces/SpineObjectData.cs similarity index 97% rename from Spine/SpineWrappers/SpineObjectData.cs rename to Spine/Interfaces/SpineObjectData.cs index 7017d3c..18c4490 100644 --- a/Spine/SpineWrappers/SpineObjectData.cs +++ b/Spine/Interfaces/SpineObjectData.cs @@ -6,9 +6,10 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using NLog; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations; +using Spine.Interfaces.Attachments; -namespace Spine.SpineWrappers +namespace Spine.Interfaces { /// /// 应当继承该类实现多版本, 子类需要提供签名为 的构造函数 diff --git a/Spine/Spine.csproj b/Spine/Spine.csproj index d7ec78a..dc06ec4 100644 --- a/Spine/Spine.csproj +++ b/Spine/Spine.csproj @@ -32,10 +32,4 @@ - - - - - - diff --git a/Spine/SpineObject.cs b/Spine/SpineObject.cs index 1baff8e..564440e 100644 --- a/Spine/SpineObject.cs +++ b/Spine/SpineObject.cs @@ -1,6 +1,7 @@ using NLog; -using Spine.SpineWrappers; -using Spine.SpineWrappers.Attachments; +using Spine.Implementations; +using Spine.Interfaces; +using Spine.Interfaces.Attachments; using Spine.Utils; using System; using System.Collections.Frozen; diff --git a/SpineViewer/Extensions/SpineObjectExtension.cs b/SpineViewer/Extensions/SpineObjectExtension.cs index 9d8d703..ca24299 100644 --- a/SpineViewer/Extensions/SpineObjectExtension.cs +++ b/SpineViewer/Extensions/SpineObjectExtension.cs @@ -1,4 +1,5 @@ using Spine; +using Spine.Interfaces; using System; using System.Collections.Generic; using System.Linq; diff --git a/SpineViewer/Models/PreferenceModel.cs b/SpineViewer/Models/PreferenceModel.cs index c937a65..2b812d2 100644 --- a/SpineViewer/Models/PreferenceModel.cs +++ b/SpineViewer/Models/PreferenceModel.cs @@ -1,6 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using Spine.SpineWrappers; using SpineViewer.Services; using System; using System.Collections.Generic; diff --git a/SpineViewer/Models/SpineObjectConfigModel.cs b/SpineViewer/Models/SpineObjectConfigModel.cs index 6f2c532..351ac3e 100644 --- a/SpineViewer/Models/SpineObjectConfigModel.cs +++ b/SpineViewer/Models/SpineObjectConfigModel.cs @@ -1,4 +1,4 @@ -using Spine.SpineWrappers; +using Spine.Interfaces; using System; using System.Collections.Generic; using System.IO; diff --git a/SpineViewer/Models/SpineObjectModel.cs b/SpineViewer/Models/SpineObjectModel.cs index 1612b96..cfaf4bd 100644 --- a/SpineViewer/Models/SpineObjectModel.cs +++ b/SpineViewer/Models/SpineObjectModel.cs @@ -15,7 +15,7 @@ using System.Windows.Media.Imaging; using CommunityToolkit.Mvvm.ComponentModel; using NLog; using Spine; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineViewer.Extensions; namespace SpineViewer.Models @@ -428,6 +428,14 @@ namespace SpineViewer.Models lock (_lock) return _spineObject.GetCurrentBounds(); } + /// + /// 命中检测, 可以比整体包围盒略精确一点 + /// + public bool HitTest(float x, float y) + { + lock (_lock) return _spineObject.Skeleton.HitTest(x, y); + } + public SpineObjectConfigModel ObjectConfig { get diff --git a/SpineViewer/ViewModels/MainWindow/ExplorerListViewModel.cs b/SpineViewer/ViewModels/MainWindow/ExplorerListViewModel.cs index 0f85b90..a4860de 100644 --- a/SpineViewer/ViewModels/MainWindow/ExplorerListViewModel.cs +++ b/SpineViewer/ViewModels/MainWindow/ExplorerListViewModel.cs @@ -20,6 +20,7 @@ using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shell; +using Spine.Interfaces; namespace SpineViewer.ViewModels.MainWindow { diff --git a/SpineViewer/ViewModels/MainWindow/PreferenceViewModel.cs b/SpineViewer/ViewModels/MainWindow/PreferenceViewModel.cs index 11c79c0..9818ff5 100644 --- a/SpineViewer/ViewModels/MainWindow/PreferenceViewModel.cs +++ b/SpineViewer/ViewModels/MainWindow/PreferenceViewModel.cs @@ -2,7 +2,7 @@ using CommunityToolkit.Mvvm.Input; using Microsoft.Win32; using NLog; -using Spine.SpineWrappers; +using Spine.Implementations; using SpineViewer.Models; using SpineViewer.Natives; using SpineViewer.Services; diff --git a/SpineViewer/ViewModels/MainWindow/SpineObjectTabViewModel.cs b/SpineViewer/ViewModels/MainWindow/SpineObjectTabViewModel.cs index 3462a2b..8f7bc69 100644 --- a/SpineViewer/ViewModels/MainWindow/SpineObjectTabViewModel.cs +++ b/SpineViewer/ViewModels/MainWindow/SpineObjectTabViewModel.cs @@ -1,7 +1,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using Spine; -using Spine.SpineWrappers; +using Spine.Interfaces; using SpineViewer.Models; using System.Collections; using System.Collections.Immutable; diff --git a/SpineViewerCLI/SpineViewerCLI.cs b/SpineViewerCLI/SpineViewerCLI.cs index 2c91c5e..6397632 100644 --- a/SpineViewerCLI/SpineViewerCLI.cs +++ b/SpineViewerCLI/SpineViewerCLI.cs @@ -4,6 +4,7 @@ using SFML.Graphics; using SFML.System; using Spine; using Spine.Exporters; +using Spine.Interfaces; namespace SpineViewerCLI {