auto main() -> int
{
using person = pronto::entity<food, hunger, human>;
using bulldog = pronto::entity<food, hunger, dog>;
// Synchronization for concurrent read and write attempts ...
pronto::synchronize<person, bulldog>([]
{
auto people = pronto::create<person>(1000);
auto bulldogs = pronto::create<bulldog>(1000);
pronto::process(people, [&](person & p, food & f) {
std::cout << "entity id: " << p << std::endl;
pronto::process(bulldogs, [&](hunger & h) {
h.eat(f)
});
});
pronto::destroy(bulldogs);
pronto::destroy(people);
});
}
-
Notifications
You must be signed in to change notification settings - Fork 1
Entity System
grandstack/Pronto
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Entity System
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published