forked from Misaki/GhostEngine
Support enableable components and query enhancements
- Upgraded `Misaki.HighPerformance.LowLevel` to v1.2.8. - Added `IEquatable` to `Handle<T>` and `Identifier<T>`. - Improved `Result` extensions with `[CallerArgumentExpression]`. - Introduced `SetEnabled` in `EntityManager` to toggle components. - Refactored `Chunk` and `Archetype` for enableable components. - Added `EntityQueryMask` for filtering enabled/disabled components. - Enhanced `QueryBuilder` with new filtering methods (`WithAll`, etc.). - Improved `EntityQuery.ForEach` with entity validation.
This commit is contained in:
@@ -4,7 +4,7 @@ public interface IHandleType;
|
||||
public interface IIdentifierType;
|
||||
public interface IKeyType;
|
||||
|
||||
public readonly struct Handle<T>
|
||||
public readonly struct Handle<T> : IEquatable<Handle<T>>
|
||||
where T : IHandleType
|
||||
{
|
||||
public readonly int id;
|
||||
@@ -57,7 +57,7 @@ public readonly struct Handle<T>
|
||||
}
|
||||
}
|
||||
|
||||
public readonly struct Identifier<T>
|
||||
public readonly struct Identifier<T> : IEquatable<Identifier<T>>
|
||||
where T : IIdentifierType
|
||||
{
|
||||
public readonly int value;
|
||||
@@ -74,7 +74,7 @@ public readonly struct Identifier<T>
|
||||
|
||||
public readonly override int GetHashCode()
|
||||
{
|
||||
return value.GetHashCode();
|
||||
return value;
|
||||
}
|
||||
|
||||
public readonly override bool Equals(object? obj)
|
||||
|
||||
Reference in New Issue
Block a user