Add Iterator<>.First()

main
copygirl 2 years ago
parent 2c5d7f6c65
commit ef00efd4bc
  1. 2
      src/gaemstone.ECS/Iterator.cs

@ -29,6 +29,8 @@ public unsafe class Iterator<TContext> : Iterator
public new Iterator<TContext> SetVar(Variable var, Entity entity)
=> (Iterator<TContext>)base.SetVar(var, entity);
public new Entity<TContext>? First()
=> Entity<TContext>.GetOrNull(World, base.First());
public new IEnumerable<Entity<TContext>> GetAllEntities()
=> base.GetAllEntities().Select(e => Entity<TContext>.GetOrInvalid(World, e));

Loading…
Cancel
Save