Use ecs_iter_is_true in Iterator.Any

main
copygirl 2 years ago
parent 1607506e32
commit 99174ece5c
  1. 6
      src/gaemstone.ECS/Internal/Iterator.cs

@ -55,12 +55,12 @@ public unsafe class Iterator
public virtual bool Next()
=> ecs_iter_next(Handle);
public bool Any()
{ using (this) return Next(); }
public Entity First()
=> new(ecs_iter_first(Handle));
public bool Any()
=> ecs_iter_is_true(Handle);
public IEnumerable<Entity> GetAllEntities()
{
while (Next())

Loading…
Cancel
Save