chore: initial commit

This commit is contained in:
2026-05-08 11:04:00 +08:00
commit f55d2a57c3
6278 changed files with 866081 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
namespace BaseGames.Core.Events
{
/// <summary>
/// 游戏状态 ID值类型替代旧版 GameState 枚举)。
/// 具体实例由 GameStates 静态工厂创建。
/// </summary>
public readonly struct GameStateId : System.IEquatable<GameStateId>
{
public readonly string Id;
public GameStateId(string id) => Id = id;
public bool Equals(GameStateId other) => Id == other.Id;
public override bool Equals(object obj) => obj is GameStateId g && Equals(g);
public override int GetHashCode() => Id?.GetHashCode() ?? 0;
public override string ToString() => Id ?? "<null>";
public static bool operator ==(GameStateId a, GameStateId b) => a.Equals(b);
public static bool operator !=(GameStateId a, GameStateId b) => !a.Equals(b);
}
}