public EntitySelector CreateAndGet(Position pos) { Objective _age = FunctionWriter.EnsureAgeObjective(); _age[EntitySelector.AllEntities.Is(type).Tag(tag)]++; Create(pos); _age[EntitySelector.AllEntities.Is(type).Tag(tag)]++; return(EntitySelector.AllEntities.Is(type).Tag(tag).Score(_age, 1).LimitTo(1)); }
public void Create(Position pos, Action <Entities> action) { Objective _age = FunctionWriter.EnsureAgeObjective(); _age[EntitySelector.AllEntities.Is(type).Tag(tag)]++; Create(pos); _age[EntitySelector.AllEntities.Is(type).Tag(tag)]++; EntitySelector.AllEntities.Is(type).Score(_age, 1).Execute.Run(action); }