add entity trigger type parameter
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -18,7 +18,7 @@ struct EntityDef {
|
||||
|
||||
std::string scriptName = name.substr(name.find(':')+1);
|
||||
glm::vec3 hitbox {0.5f};
|
||||
std::vector<AABB> triggers {};
|
||||
std::vector<AABB> boxTriggers {};
|
||||
std::string rigName = name.substr(name.find(":")+1);
|
||||
|
||||
struct {
|
||||
|
||||
Reference in New Issue
Block a user