mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entity trigger type parameter
This commit is contained in:
parent
5b154b57b3
commit
8add39e506
5 changed files with 15 additions and 8 deletions
|
|
@ -52,7 +52,7 @@ entityid_t Entities::spawn(
|
|||
registry.emplace<Transform>(entity, pos, size, glm::mat3(1.0f));
|
||||
auto& body = registry.emplace<Rigidbody>(
|
||||
entity, true, Hitbox {pos, def.hitbox}, std::vector<Trigger>{});
|
||||
for (auto& box : def.triggers) {
|
||||
for (auto& box : def.boxTriggers) {
|
||||
body.triggers.emplace_back(Trigger{
|
||||
true,
|
||||
id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue