Files
zeling_v2/Assets/Scripts/Core/Events/LiquidEvent.cs
2026-05-08 11:04:00 +08:00

30 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace BaseGames.Core.Events
{
/// <summary>
/// 液体区域事件负载。用于玩家进入/离开液体区域时传递区域信息。
/// </summary>
public readonly struct LiquidEvent
{
/// <summary>液体区域标识符(对应 LiquidZone SO 的 zoneId。</summary>
public readonly string ZoneId;
/// <summary>液体类型(如 "Water" / "Acid" / "Lava")。</summary>
public readonly string LiquidType;
public LiquidEvent(string zoneId, string liquidType)
{
ZoneId = zoneId;
LiquidType = liquidType;
}
public override string ToString() => $"LiquidEvent(Zone={ZoneId}, Type={LiquidType})";
}
/// <summary>
/// 液体进出事件频道EVT_LiquidEntered / EVT_LiquidExited
/// 发布LiquidZoneOnTriggerEnter2D / OnTriggerExit2D
/// 订阅PlayerController切换游泳状态、DrownSystem、AudioManager
/// </summary>
[UnityEngine.CreateAssetMenu(menuName = "Events/LiquidEvent")]
public class LiquidEventChannelSO : BaseEventChannelSO<LiquidEvent> { }
}