1#include <without.h>
2#include <iostream>
3
4struct Position {
5 double x, y;
6};
7
8struct Npc { };
9
10int main(int, char *[]) {
12
13
14
15
16
17
18
19
20
22 .without<Npc>()
23 .build();
24
25
27 .set<Position>({10, 20});
28
30 .set<Position>({10, 20});
31
32
34 .set<Position>({10, 20})
35 .add<Npc>();
36
37
38
40 std::cout << e.
name() <<
": {" << p.x <<
", " << p.y <<
"}\n";
41 });
42
43
44
45
46}
flecs::query_builder< Comps... > query_builder(Args &&... args) const
Create a query builder.
flecs::entity entity(Args &&... args) const
Create an entity.
flecs::string_view name() const
Return the entity name.
void each(Func &&func) const
Each iterator.