diff options
author | sanine <sanine.not@pm.me> | 2023-05-07 21:16:13 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-05-07 21:16:13 -0500 |
commit | 61f8813b0beb6228f99cf0ea80acee5f4cab063f (patch) | |
tree | c4eca7d64a045b70f0eca34d02162235c1a6acdd /honey/ecs.lua | |
parent | 445fc5217859a799e3a977c9763141d9a5f6cbb5 (diff) |
correctly implement capsule collisions and camera view matrix
Diffstat (limited to 'honey/ecs.lua')
-rw-r--r-- | honey/ecs.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/honey/ecs.lua b/honey/ecs.lua index 260c389..b0409e4 100644 --- a/honey/ecs.lua +++ b/honey/ecs.lua @@ -146,6 +146,14 @@ function EntityDb.addComponents(self, id, components) end +-- create an entity with components +function EntityDb.createEntityWithComponents(self, components) + local id = self:createEntity() + self:addComponents(id, components) + return id +end + + -- get all entities with a given component function EntityDb.queryComponent(self, name) local component = self.components[name] |