feat(gameplay): 更新单位属性和材质配置

- 调整多个单位的基础生命值和攻击力数值平衡
- 修改CoreBattleGround材质的纹理缩放比例
- 更新地砖材质颜色为白色
- 优化纹理资源设置,调整最大纹理尺寸并添加PlayableAds平台支持
- 修复弓箭手技能目标查找逻辑,改用统一的敌人检测方法
- 为水晶矿添加中立阵营设置和光球视觉效果同步
- 调整预制体中的全局缩放参数
- 为狼人和石巨人添加NavMeshAgent组件支持
- 优化水晶矿血条显示位置计算方式
```
This commit is contained in:
huadexuan committed 2026-09-20 21:52:31 +08:00
1 parent 0e7de5f885
commit 53d95802e5
448 files changed
+133333 -472

No files matched your search

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using Codely.Newtonsoft.Json.Linq;
using UnityTcp.Editor.Helpers;
namespace UnityTcp.Editor.Tools
{
/// <summary>
/// <c>manage_dialog</c>: clicks a button on a native modal editor dialog.
///
/// Single action:
/// click – Params: button (regex over button labels), optional title (regex over dialog
/// titles). Clicks the first open modal dialog whose title/button match.
///
/// The command runs on the <see cref="BackgroundCommandPump"/> worker thread, which is the
/// point: a native modal dialog holds the editor main thread captive inside its message
/// pump, so this is the only way a client can answer one. The click itself is thread-safe
/// on Windows (Win32 cross-thread post); on macOS <see cref="DialogWatcher"/> marshals
/// it onto the common-modes run-loop probe, which keeps firing on the main thread even
/// during a modal session.
///
/// When such a dialog is detected, <see cref="DialogWatcher"/> detaches every
/// in-flight job with a reason that names the dialog and its buttons and points at this
/// command — the client picks a button, clicks it here, and then collects the detached
/// jobs' results via <c>manage_job.status</c>.
/// </summary>
public static class ManageDialog
{
private static readonly Dictionary<string, Func<JObject, object>> ActionHandlers =
new Dictionary<string, Func<JObject, object>>
{
{ "click", Click },
};
public static object HandleCommand(JObject @params)
=> ActionRouter.Route(@params, ActionHandlers);
private static object Click(JObject @params)
{
string button = @params["button"]?.ToString();
string title = @params["title"]?.ToString();
string failure = DialogWatcher.ClickOpenDialog(title, button,
out string clickedTitle, out string clickedButton);
return failure != null
? Response.Error(failure)
: Response.Success($"Clicked '{clickedButton}' on dialog '{clickedTitle}'.");
}
}
}