调整文件结构

This commit is contained in:
ww-rm
2025-10-02 15:18:40 +08:00
parent 152d842043
commit 0abe063899
6 changed files with 7 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
using NLog;
using Spine.Interfaces;
using Spine.Interfaces.Attachments;
using System;
using System.Collections.Generic;
@@ -6,7 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spine.Interfaces
namespace Spine
{
/// <summary>
/// 命中测试等级枚举值
@@ -136,7 +137,7 @@ namespace Spine.Interfaces
if (HitTestLevel == HitTestLevel.None || HitTestLevel == HitTestLevel.Bounds)
{
self.GetBounds(out var bx, out var by, out var bw, out var bh);
return x >= bx && x <= (bx + bw) && y >= by && y <= (by + bh);
return x >= bx && x <= bx + bw && y >= by && y <= by + bh;
}
else if (HitTestLevel == HitTestLevel.Meshes || HitTestLevel == HitTestLevel.Pixels)
{
@@ -179,7 +180,7 @@ namespace Spine.Interfaces
float c2 = Cross(x2, y2, x0, y0);
// 判断是否全部同号 (或为 0, 点在边上)
if ((c0 >= 0 && c1 >= 0 && c2 >= 0) || (c0 <= 0 && c1 <= 0 && c2 <= 0))
if (c0 >= 0 && c1 >= 0 && c2 >= 0 || c0 <= 0 && c1 <= 0 && c2 <= 0)
{
if (HitTestLevel == HitTestLevel.Meshes)
return true;
@@ -229,7 +230,7 @@ namespace Spine.Interfaces
if (HitTestLevel == HitTestLevel.None)
{
self.GetBounds(out var bx, out var by, out var bw, out var bh);
return x >= bx && x <= (bx + bw) && y >= by && y <= (by + bh);
return x >= bx && x <= bx + bw && y >= by && y <= by + bh;
}
bool hit = false;

View File

@@ -1,5 +1,4 @@
using Spine;
using Spine.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -1,6 +1,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Spine.Interfaces;
using Spine;
using SpineViewer.Services;
using System;
using System.Collections.Generic;

View File

@@ -20,7 +20,6 @@ using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shell;
using Spine.Interfaces;
namespace SpineViewer.ViewModels.MainWindow
{

View File

@@ -2,8 +2,8 @@
using CommunityToolkit.Mvvm.Input;
using Microsoft.Win32;
using NLog;
using Spine;
using Spine.Implementations;
using Spine.Interfaces;
using SpineViewer.Models;
using SpineViewer.Natives;
using SpineViewer.Services;

View File

@@ -4,7 +4,6 @@ using SFML.Graphics;
using SFML.System;
using Spine;
using Spine.Exporters;
using Spine.Interfaces;
namespace SpineViewerCLI
{