mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add player.get/set_entity
This commit is contained in:
parent
9d98c40528
commit
f4653878a2
4 changed files with 34 additions and 6 deletions
|
|
@ -82,7 +82,8 @@ entityid_t Entities::spawn(
|
|||
id = uid;
|
||||
}
|
||||
registry.emplace<EntityId>(entity, static_cast<entityid_t>(id), def);
|
||||
auto& tsf = registry.emplace<Transform>(entity, position, glm::vec3(1.0f), glm::mat3(1.0f), glm::mat4(1.0f), true);
|
||||
const auto& tsf = registry.emplace<Transform>(
|
||||
entity, position, glm::vec3(1.0f), glm::mat3(1.0f), glm::mat4(1.0f), true);
|
||||
auto& body = registry.emplace<Rigidbody>(
|
||||
entity, true, Hitbox {position, def.hitbox}, std::vector<Trigger>{});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue