Refactor event channels and update layer specifications

- Removed StatusEffectEventChannelSO and its associated meta file.
- Updated CreateEventChannelAssets to handle new shield-related events.
- Added CharmModule for managing charm assets in the DataHub.
- Introduced CharmEventChannelSO for charm equipped/unequipped events.
- Changed layer references from "Ground" to "Platform" in various scripts.
- Updated documentation to reflect changes in layer specifications.
- Created new event assets for ShieldBroken, ShieldRestored, StatusEffectApplied, and StatusEffectExpired.
This commit is contained in:
2026-05-21 11:08:14 +08:00
parent 280c7b22f5
commit d09bc95c3f
32 changed files with 1151 additions and 52 deletions

View File

@@ -2,6 +2,7 @@ using UnityEngine;
using UnityEditor;
using BaseGames.Core.Events;
using BaseGames.Combat;
using BaseGames.Combat.StatusEffects;
using BaseGames.Equipment;
using BaseGames.Parry;
using BaseGames.Player;
@@ -54,6 +55,8 @@ namespace BaseGames.Editor
CreateAsset<VoidEventChannelSO> ("Combat", "EVT_CheckpointRespawn");
CreateAsset<StatusEffectEventChannelSO> ("Combat", "EVT_StatusEffectApplied");
CreateAsset<StatusEffectEventChannelSO> ("Combat", "EVT_StatusEffectExpired");
CreateAsset<VoidEventChannelSO> ("Combat", "EVT_ShieldBroken");
CreateAsset<VoidEventChannelSO> ("Combat", "EVT_ShieldRestored");
// ── Boss ──────────────────────────────────────────────────────────
CreateAsset<BossSkillEventChannelSO> ("Boss", "EVT_BossSkill");
@@ -180,6 +183,13 @@ namespace BaseGames.Editor
return;
}
// 存在但类型不匹配(如旧版残留),先删除再重建
if (AssetDatabase.LoadMainAssetAtPath(fullPath) != null)
{
AssetDatabase.DeleteAsset(fullPath);
Debug.Log($"[CreateEventChannelAssets] 已删除旧类型资产: {fullPath}");
}
T asset = ScriptableObject.CreateInstance<T>();
AssetDatabase.CreateAsset(asset, fullPath);
Debug.Log($"[CreateEventChannelAssets] 已创建: {fullPath}");