using System.Diagnostics.CodeAnalysis; namespace GameCore.ECS; /// /// Represents a unique object in the game world. /// It's a simple struct containing an ID to keep it lightweight. /// All data associated with an Entity is stored in Components. /// public readonly struct Entity(int id) { public readonly int Id = id; public override bool Equals([NotNullWhen(true)] object? obj) { return base.Equals(obj); } public override int GetHashCode() { return Id.GetHashCode(); } }