From 61f8813b0beb6228f99cf0ea80acee5f4cab063f Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 May 2023 21:16:13 -0500 Subject: correctly implement capsule collisions and camera view matrix --- honey/ecs.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'honey/ecs.lua') 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] -- cgit v1.2.1