Compare commits
109 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64bc12db06 | ||
|
|
7a29fee641 | ||
|
|
49f95ddbb7 | ||
|
|
317ee71882 | ||
|
|
7780fbda28 | ||
|
|
b54c6a1777 | ||
|
|
617157044c | ||
|
|
29d7e8d9d8 | ||
|
|
701d1fcf90 | ||
|
|
df36d46528 | ||
|
|
3459f3af03 | ||
|
|
5498508700 | ||
|
|
a61bb43250 | ||
|
|
aace461ae0 | ||
|
|
c02cec9a18 | ||
|
|
31daed9e81 | ||
|
|
997d55350d | ||
|
|
cc6d1b6c00 | ||
|
|
e14c54c3a4 | ||
|
|
5eba515eac | ||
|
|
f878530184 | ||
|
|
81d9224658 | ||
|
|
9d9edb8bc4 | ||
|
|
d3b5814c6f | ||
|
|
aade44cffb | ||
|
|
c4956b9c16 | ||
|
|
7ca431b214 | ||
|
|
74538ddf74 | ||
|
|
779500ee8e | ||
|
|
ee7c9e9e54 | ||
|
|
d335645dc1 | ||
|
|
0893bd4b54 | ||
|
|
862926b43e | ||
|
|
0324ba7971 | ||
|
|
6a17ec0397 | ||
|
|
53a7700798 | ||
|
|
30608e05bc | ||
|
|
3dcd7b22ca | ||
|
|
dae5d0b7c7 | ||
|
|
f5d3f93cde | ||
|
|
dbd7c13c32 | ||
|
|
b662d8f68a | ||
|
|
02445d36e5 | ||
|
|
b178e48e84 | ||
|
|
c90713ffe7 | ||
|
|
dc472cf2a8 | ||
|
|
03c599264e | ||
|
|
8f7297bea5 | ||
|
|
e4d655012b | ||
|
|
4b23c779d3 | ||
|
|
f5684a50dc | ||
|
|
579ce9f944 | ||
|
|
7aa88089b8 | ||
|
|
be983f8407 | ||
|
|
249b930602 | ||
|
|
6472f378b7 | ||
|
|
8672f0571c | ||
|
|
e7a990c1bd | ||
|
|
6727fa8e8f | ||
|
|
66d8c489b5 | ||
|
|
1931c4713a | ||
|
|
f19f172e7c | ||
|
|
092fa76124 | ||
|
|
a0b7db0a70 | ||
|
|
6438b46ea0 | ||
|
|
2bf73db9d3 | ||
|
|
03c4974c9f | ||
|
|
760fa3a451 | ||
|
|
018d8f5330 | ||
|
|
c9730e1a11 | ||
|
|
1f6e19e544 | ||
|
|
a1a0777791 | ||
|
|
887e3f76d2 | ||
|
|
8b622050fa | ||
|
|
20369aaf43 | ||
|
|
07c0e84b7d | ||
|
|
6770acaffd | ||
|
|
6201ccc7d1 | ||
|
|
965d1c469e | ||
|
|
b448ca8cb0 | ||
|
|
2204eb6c75 | ||
|
|
0abe063899 | ||
|
|
6f9b357473 | ||
|
|
152d842043 | ||
|
|
d16f97d574 | ||
|
|
d28eabaca5 | ||
|
|
b730f677be | ||
|
|
8f8806417a | ||
|
|
06694c9e89 | ||
|
|
e9b0ce3db2 | ||
|
|
4c72608398 | ||
|
|
7e99882fbf | ||
|
|
0d72d8749a | ||
|
|
d5b7a74520 | ||
|
|
0202027edb | ||
|
|
d1d32b6292 | ||
|
|
b32485e122 | ||
|
|
36d578f4d4 | ||
|
|
42bd5c2830 | ||
|
|
44548618e8 | ||
|
|
681b1be360 | ||
|
|
30dee9978c | ||
|
|
47aafc7948 | ||
|
|
1d8e2efdff | ||
|
|
dd504d32ca | ||
|
|
267c7b81c3 | ||
|
|
c4a6fd9d86 | ||
|
|
6e46152e4c | ||
|
|
f2f296e494 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -396,3 +396,5 @@ FodyWeavers.xsd
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
launchSettings.json
|
||||
|
||||
50
CHANGELOG.md
50
CHANGELOG.md
@@ -1,5 +1,55 @@
|
||||
# CHANGELOG
|
||||
|
||||
## v0.16.9
|
||||
|
||||
- 重构 CLI 工具
|
||||
|
||||
## v0.16.8
|
||||
|
||||
- 去除首次的最小化提示弹框
|
||||
- 窗口布局改变后实时保存
|
||||
- 增加侧边栏图标和折叠功能
|
||||
- 增加皮肤和插槽参数面板的全部启用/禁用菜单项
|
||||
- 修改窗口默认大小
|
||||
- 支持复制并应用单独的模型皮肤或插槽参数
|
||||
|
||||
## v0.16.7
|
||||
|
||||
- 修复空帧导致的包围盒计算错误
|
||||
- 修复重复启动程序无法唤出界面的问题
|
||||
|
||||
## v0.16.6
|
||||
|
||||
- 修复控件尺寸为0时导致的画面缩放错误
|
||||
|
||||
## v0.16.5
|
||||
|
||||
- 修复对于无 size 行的旧 atlas 格式读取错误
|
||||
- 修复托盘化之后无法联动显示窗口的问题
|
||||
|
||||
## v0.16.4
|
||||
|
||||
- 增加 apng 导出格式
|
||||
- 增加颜色拾取器面板
|
||||
- 增加程序皮肤(主题颜色)首选项
|
||||
- 优化部分使用体验
|
||||
|
||||
## v0.16.3
|
||||
|
||||
- 修复加载工作区时的顺序错误
|
||||
- 调整部分调试渲染的逻辑
|
||||
- 完善命中检测逻辑
|
||||
|
||||
## v0.16.2
|
||||
|
||||
- 修复批量添加时的添加顺序错误
|
||||
- 增加精确命中检测和插槽输出功能
|
||||
- 部分代码重构
|
||||
|
||||
## v0.16.1
|
||||
|
||||
- 修复 3.4 版本存在的附件残留问题
|
||||
|
||||
## v0.16.0
|
||||
|
||||
- 增加最小化至托盘图标功能
|
||||
|
||||
@@ -10,7 +10,7 @@ A simple and user-friendly Spine file viewer and exporter with multi-language su
|
||||
|
||||

|
||||
|
||||
<video src="https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0">
|
||||
https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0
|
||||
|
||||
## Features
|
||||
|
||||
@@ -143,6 +143,7 @@ For detailed usage and documentation, see the [Wiki](https://github.com/ww-rm/Sp
|
||||
- [HandyControl](https://github.com/HandyOrg/HandyControl)
|
||||
- [NLog](https://github.com/NLog/NLog)
|
||||
- [SkiaSharp](https://github.com/mono/SkiaSharp)
|
||||
- [Spectre.Console](https://github.com/spectreconsole/spectre.console)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
[](https://github.com/ww-rm/SpineViewer/releases)
|
||||
[](https://github.com/ww-rm/SpineViewer/releases)
|
||||
|
||||

|
||||
|
||||
[中文](README.md) | [English](README.en.md)
|
||||
|
||||
Spine 文件查看&导出程序, 同时也是支持 Spine 的动态壁纸程序.
|
||||
|
||||

|
||||
|
||||
<video src="https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0">
|
||||
https://github.com/user-attachments/assets/37b6b730-088a-4352-827a-c338127a16f0
|
||||
|
||||
## 功能
|
||||
|
||||
@@ -140,6 +142,7 @@ Spine 文件查看&导出程序, 同时也是支持 Spine 的动态壁纸程序.
|
||||
- [HandyControl](https://github.com/HandyOrg/HandyControl)
|
||||
- [NLog](https://github.com/NLog/NLog)
|
||||
- [SkiaSharp](https://github.com/mono/SkiaSharp)
|
||||
- [Spectre.Console](https://github.com/spectreconsole/spectre.console)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -240,8 +240,8 @@ namespace SFMLRenderer
|
||||
if (RenderWindow is null) return;
|
||||
float parentW = (float)sizeInfo.NewSize.Width;
|
||||
float parentH = (float)sizeInfo.NewSize.Height;
|
||||
float renderW = (float)_hwndHost.ActualWidth;
|
||||
float renderH = (float)_hwndHost.ActualHeight;
|
||||
float renderW = _resolution.X;
|
||||
float renderH = _resolution.Y;
|
||||
float scale = Math.Min(parentW / renderW, parentH / renderH); // 两方向取较小值, 保证 parent 覆盖 render
|
||||
renderW *= scale;
|
||||
renderH *= scale;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
<Version>0.16.0</Version>
|
||||
<Version>0.16.6</Version>
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
using SFML.Graphics;
|
||||
using SFML.System;
|
||||
using SkiaSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace SpineViewer.Extensions
|
||||
namespace Spine.Exporters
|
||||
{
|
||||
public static class SFMLExtension
|
||||
public static class Extension
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取适合指定画布参数下能够覆盖包围盒的画布视区包围盒
|
||||
@@ -53,31 +49,11 @@ namespace SpineViewer.Extensions
|
||||
public static FloatRect GetBounds(this View self)
|
||||
{
|
||||
return new(
|
||||
self.Center.X - self.Size.X / 2,
|
||||
self.Center.Y - self.Size.Y / 2,
|
||||
self.Size.X,
|
||||
self.Center.X - self.Size.X / 2,
|
||||
self.Center.Y - self.Size.Y / 2,
|
||||
self.Size.X,
|
||||
self.Size.Y
|
||||
);
|
||||
}
|
||||
|
||||
public static FloatRect ToFloatRect(this Rect self)
|
||||
{
|
||||
return new((float)self.X, (float)self.Y, (float)self.Width, (float)self.Height);
|
||||
}
|
||||
|
||||
public static Vector2f ToVector2f(this Size self)
|
||||
{
|
||||
return new((float)self.Width, (float)self.Height);
|
||||
}
|
||||
|
||||
public static Vector2u ToVector2u(this Size self)
|
||||
{
|
||||
return new((uint)self.Width, (uint)self.Height);
|
||||
}
|
||||
|
||||
public static Vector2i ToVector2i(this Size self)
|
||||
{
|
||||
return new((int)self.Width, (int)self.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,12 +28,40 @@ namespace Spine.Exporters
|
||||
{
|
||||
Gif,
|
||||
Webp,
|
||||
Apng,
|
||||
Mp4,
|
||||
Webm,
|
||||
Mkv,
|
||||
Mov,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apng 格式预测器算法
|
||||
/// </summary>
|
||||
public enum ApngPredMethod
|
||||
{
|
||||
None = 0,
|
||||
Sub = 1,
|
||||
Up = 2,
|
||||
Avg = 3,
|
||||
Paeth = 4,
|
||||
Mixed = 5,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mov prores_ks 编码器 profile 参数
|
||||
/// </summary>
|
||||
public enum MovProfile
|
||||
{
|
||||
Auto = -1,
|
||||
Proxy = 0,
|
||||
Light = 1,
|
||||
Standard = 2,
|
||||
High = 3,
|
||||
Yuv4444 = 4,
|
||||
Yuv4444Extreme = 5,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 视频格式
|
||||
/// </summary>
|
||||
@@ -41,34 +69,40 @@ namespace Spine.Exporters
|
||||
private VideoFormat _format = VideoFormat.Mp4;
|
||||
|
||||
/// <summary>
|
||||
/// 动图是否循环 [Gif/Webp]
|
||||
/// [Gif/Webp/Apng] 动图是否循环
|
||||
/// </summary>
|
||||
public bool Loop { get => _loop; set => _loop = value; }
|
||||
private bool _loop = true;
|
||||
|
||||
/// <summary>
|
||||
/// 质量 [Webp]
|
||||
/// [Webp] 质量
|
||||
/// </summary>
|
||||
public int Quality { get => _quality; set => _quality = Math.Clamp(value, 0, 100); }
|
||||
private int _quality = 75;
|
||||
|
||||
/// <summary>
|
||||
/// 无损压缩 [Webp]
|
||||
/// [Webp] 无损压缩
|
||||
/// </summary>
|
||||
public bool Lossless { get => _lossless; set => _lossless = value; }
|
||||
private bool _lossless = false;
|
||||
|
||||
/// <summary>
|
||||
/// CRF [Mp4/Webm/Mkv]
|
||||
/// [Apng] 预测器算法
|
||||
/// </summary>
|
||||
public ApngPredMethod PredMethod { get => _predMethod; set => _predMethod = value; }
|
||||
private ApngPredMethod _predMethod = ApngPredMethod.Mixed;
|
||||
|
||||
/// <summary>
|
||||
/// [Mp4/Webm/Mkv] CRF
|
||||
/// </summary>
|
||||
public int Crf { get => _crf; set => _crf = Math.Clamp(value, 0, 63); }
|
||||
private int _crf = 23;
|
||||
|
||||
/// <summary>
|
||||
/// prores_ks 编码器的配置等级, -1 是自动, 越高质量越好, 只有 4 及以上才有透明通道 [Mov]
|
||||
/// [Mov] prores_ks 编码器的配置等级, 越高质量越好, 只有 <see cref="MovProfile.Yuv4444"> 及以上才有透明通道
|
||||
/// </summary>
|
||||
public int Profile { get => _profile; set => _profile = Math.Clamp(value, -1, 5); }
|
||||
private int _profile = 5;
|
||||
public MovProfile Profile { get => _profile; set => _profile = value; }
|
||||
private MovProfile _profile = MovProfile.Yuv4444Extreme;
|
||||
|
||||
/// <summary>
|
||||
/// 获取的一帧, 结果是预乘的
|
||||
@@ -93,6 +127,7 @@ namespace Spine.Exporters
|
||||
{
|
||||
VideoFormat.Gif => SetGifOptions,
|
||||
VideoFormat.Webp => SetWebpOptions,
|
||||
VideoFormat.Apng => SetApngOptions,
|
||||
VideoFormat.Mp4 => SetMp4Options,
|
||||
VideoFormat.Webm => SetWebmOptions,
|
||||
VideoFormat.Mkv => SetMkvOptions,
|
||||
@@ -132,6 +167,13 @@ namespace Spine.Exporters
|
||||
.WithCustomArgument(customArgs);
|
||||
}
|
||||
|
||||
private void SetApngOptions(FFMpegArgumentOptions options)
|
||||
{
|
||||
var customArgs = $"-vf unpremultiply=inplace=1 -plays {(_loop ? 0 : 1)} -pred {(int)_predMethod}";
|
||||
options.ForceFormat("apng").WithVideoCodec("apng").ForcePixelFormat("rgba")
|
||||
.WithCustomArgument(customArgs);
|
||||
}
|
||||
|
||||
private void SetMp4Options(FFMpegArgumentOptions options)
|
||||
{
|
||||
// XXX: windows 默认播放器在播放 MP4 格式时对于 libx264 编码器只支持 yuv420p 的像素格式
|
||||
@@ -164,7 +206,7 @@ namespace Spine.Exporters
|
||||
var customArgs = "-vf unpremultiply=inplace=1";
|
||||
options.ForceFormat("mov").WithVideoCodec("prores_ks").ForcePixelFormat("yuva444p10le")
|
||||
.WithFastStart()
|
||||
.WithCustomArgument($"-profile {_profile}")
|
||||
.WithCustomArgument($"-profile {(int)_profile}")
|
||||
.WithCustomArgument(customArgs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,27 @@ namespace Spine.Exporters
|
||||
public FrameExporter(uint width = 100, uint height = 100) : base(width, height) { }
|
||||
public FrameExporter(Vector2u resolution) : base(resolution) { }
|
||||
|
||||
public SKEncodedImageFormat Format { get => _format; set => _format = value; }
|
||||
public SKEncodedImageFormat Format
|
||||
{
|
||||
get => _format;
|
||||
set {
|
||||
switch (value)
|
||||
{
|
||||
case SKEncodedImageFormat.Jpeg:
|
||||
case SKEncodedImageFormat.Png:
|
||||
case SKEncodedImageFormat.Webp:
|
||||
_format = value;
|
||||
break;
|
||||
default:
|
||||
_logger.Warn("Omit unsupported exporter format: {0}", value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
protected SKEncodedImageFormat _format = SKEncodedImageFormat.Png;
|
||||
|
||||
public int Quality { get => _quality; set => _quality = Math.Clamp(value, 0, 100); }
|
||||
protected int _quality = 80;
|
||||
protected int _quality = 100;
|
||||
|
||||
public override void Export(string output, params SpineObject[] spines)
|
||||
{
|
||||
@@ -33,5 +49,15 @@ namespace Spine.Exporters
|
||||
using var stream = File.OpenWrite(output);
|
||||
data.SaveTo(stream);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取帧图像, 结果是预乘的
|
||||
/// </summary>
|
||||
public SKImage ExportMemoryImage(params SpineObject[] spines)
|
||||
{
|
||||
using var frame = GetFrame(spines);
|
||||
var info = new SKImageInfo(frame.Width, frame.Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
return SKImage.FromPixelCopy(info, frame.Image.Pixels);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Spine.Exporters
|
||||
int frameCount = GetFrameCount();
|
||||
int frameIdx = 0;
|
||||
|
||||
_progressReporter?.Invoke(frameCount, 0, $"[{frameIdx}/{frameCount}] {output}");
|
||||
_progressReporter?.Invoke(frameCount, 0, $"[0/{frameCount}] {output}"); // 导出帧序列单独在此处调用进度报告
|
||||
foreach (var frame in GetFrames(spines))
|
||||
{
|
||||
if (ct.IsCancellationRequested)
|
||||
@@ -37,7 +37,7 @@ namespace Spine.Exporters
|
||||
var savePath = Path.Combine(output, $"frame_{_fps}_{frameIdx:d6}.png");
|
||||
var info = new SKImageInfo(frame.Width, frame.Height, SKColorType.Rgba8888, SKAlphaType.Premul);
|
||||
|
||||
_progressReporter?.Invoke(frameCount, frameIdx, $"[{frameIdx + 1}/{frameCount}] {savePath}");
|
||||
_progressReporter?.Invoke(frameCount, frameIdx + 1, $"[{frameIdx + 1}/{frameCount}] {savePath}");
|
||||
try
|
||||
{
|
||||
using var skImage = SKImage.FromPixelCopy(info, frame.Image.Pixels);
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Spine.Exporters
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成帧序列
|
||||
/// 生成帧序列, 用于导出帧序列
|
||||
/// </summary>
|
||||
protected IEnumerable<SFMLImageVideoFrame> GetFrames(SpineObject[] spines)
|
||||
{
|
||||
@@ -121,14 +121,14 @@ namespace Spine.Exporters
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成帧序列, 支持中途取消和进度输出
|
||||
/// 生成帧序列, 支持中途取消和进度输出, 用于动图视频等单个文件输出
|
||||
/// </summary>
|
||||
protected IEnumerable<SFMLImageVideoFrame> GetFrames(SpineObject[] spines, string output, CancellationToken ct)
|
||||
{
|
||||
int frameCount = GetFrameCount();
|
||||
int frameIdx = 0;
|
||||
|
||||
_progressReporter?.Invoke(frameCount, 0, $"[{frameIdx}/{frameCount}] {output}");
|
||||
_progressReporter?.Invoke(frameCount, 0, $"[0/{frameCount}] {output}");
|
||||
foreach (var frame in GetFrames(spines))
|
||||
{
|
||||
if (ct.IsCancellationRequested)
|
||||
@@ -138,7 +138,7 @@ namespace Spine.Exporters
|
||||
break;
|
||||
}
|
||||
|
||||
_progressReporter?.Invoke(frameCount, frameIdx, $"[{frameIdx + 1}/{frameCount}] {output}");
|
||||
_progressReporter?.Invoke(frameCount, frameIdx + 1, $"[{frameIdx + 1}/{frameCount}] {output}");
|
||||
yield return frame;
|
||||
frameIdx++;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Spine.SpineWrappers
|
||||
namespace Spine.Implementations
|
||||
{
|
||||
/// <summary>
|
||||
/// 实现不同版本的 TextureLoader
|
||||
@@ -112,6 +112,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime34.AtlasPage page, string path)
|
||||
@@ -147,6 +155,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime35.AtlasPage page, string path)
|
||||
@@ -182,6 +198,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime36.AtlasPage page, string path)
|
||||
@@ -217,6 +241,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime37.AtlasPage page, string path)
|
||||
@@ -252,6 +284,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime38.AtlasPage page, string path)
|
||||
@@ -288,9 +328,13 @@ namespace Spine.SpineWrappers
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 似乎是不需要设置的, 因为存在某些 png 和 atlas 大小不同的情况, 一般是有一些缩放, 如果设置了反而渲染异常
|
||||
// page.width = (int)texture.Size.X;
|
||||
// page.height = (int)texture.Size.Y;
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime40.AtlasPage page, string path)
|
||||
@@ -326,6 +370,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime41.AtlasPage page, string path)
|
||||
@@ -361,6 +413,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Load(SpineRuntime42.AtlasPage page, string path)
|
||||
@@ -396,6 +456,14 @@ namespace Spine.SpineWrappers
|
||||
if (ForceMipmap) texture.GenerateMipmap();
|
||||
|
||||
page.rendererObject = texture;
|
||||
|
||||
// 有些旧的 atlas 会省略 size 行, 这时需要在读取纹理时赋值
|
||||
if (page.width <= 0 || page.height <= 0)
|
||||
{
|
||||
var texSize = texture.Size;
|
||||
page.width = (int)texSize.X;
|
||||
page.height = (int)texSize.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Unload(object texture)
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V21
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,11 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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<IAnimation> _animations;
|
||||
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
|
||||
|
||||
public SpineObjectData21(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
|
||||
public SpineObjectData21(string skelPath, string atlasPath, TextureLoader textureLoader)
|
||||
: base(skelPath, atlasPath, textureLoader)
|
||||
{
|
||||
// 加载 atlas
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V34
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,12 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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<IAnimation> _animations;
|
||||
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
|
||||
|
||||
public SpineObjectData34(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
|
||||
public SpineObjectData34(string skelPath, string atlasPath, TextureLoader textureLoader)
|
||||
: base(skelPath, atlasPath, textureLoader)
|
||||
{
|
||||
// 加载 atlas
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V35
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,12 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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<IAnimation> _animations;
|
||||
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
|
||||
|
||||
public SpineObjectData35(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
|
||||
public SpineObjectData35(string skelPath, string atlasPath, TextureLoader textureLoader)
|
||||
: base(skelPath, atlasPath, textureLoader)
|
||||
{
|
||||
// 加载 atlas
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V36
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,12 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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<IAnimation> _animations;
|
||||
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
|
||||
|
||||
public SpineObjectData36(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
|
||||
public SpineObjectData36(string skelPath, string atlasPath, TextureLoader textureLoader)
|
||||
: base(skelPath, atlasPath, textureLoader)
|
||||
{
|
||||
// 加载 atlas
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V37
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,12 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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<IAnimation> _animations;
|
||||
private readonly FrozenDictionary<string, IAnimation> _animationsByName;
|
||||
|
||||
public SpineObjectData37(string skelPath, string atlasPath, Spine.SpineWrappers.TextureLoader textureLoader)
|
||||
public SpineObjectData37(string skelPath, string atlasPath, TextureLoader textureLoader)
|
||||
: base(skelPath, atlasPath, textureLoader)
|
||||
{
|
||||
// 加载 atlas
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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;
|
||||
@@ -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
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -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
|
||||
{
|
||||
@@ -52,6 +52,7 @@ namespace Spine.Implementations.SpineWrappers.V38
|
||||
|
||||
public Skeleton InnerObject => _o;
|
||||
|
||||
public string Name => _o.Data.Name;
|
||||
public float R { get => _o.R; set => _o.R = value; }
|
||||
public float G { get => _o.G; set => _o.G = value; }
|
||||
public float B { get => _o.B; set => _o.B = value; }
|
||||
@@ -95,12 +96,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();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user