summaryrefslogtreecommitdiff
path: root/honey/ecs-systems.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-03-23 13:35:37 -0500
committersanine-a <sanine.not@pm.me>2023-03-23 13:35:37 -0500
commite5553bb81c93cd76456d07d3a1d7e8bb1b249b6e (patch)
treea92801deaba55c85dd4f52636ab4f616e8483796 /honey/ecs-systems.lua
parentf4346b8f06653dbc1e0c346d88f5f83ca8a7b876 (diff)
implement skeleton of physics system
Diffstat (limited to 'honey/ecs-systems.lua')
-rw-r--r--honey/ecs-systems.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/honey/ecs-systems.lua b/honey/ecs-systems.lua
index a511b3d..237aa78 100644
--- a/honey/ecs-systems.lua
+++ b/honey/ecs-systems.lua
@@ -28,11 +28,11 @@ end
-- update transforms
transformCascade = {
filter=ecs.Filter.AND{"transform", "parent"},
- preUpdate=function(entity)
+ prepareEntity=function(self, entity)
entity._transform = nil
entity._transformComputed = false
end,
- update=function(entity, dt)
+ update=function(self, entity, dt)
recursiveComputeTransform(entity)
end,
priority=98,
@@ -45,7 +45,7 @@ function renderCam(camera, priority)
local priority = priority or 99
return {
filter=ecs.Filter.AND{"mesh", "shader", "transform"},
- update=function(entity, dt)
+ update=function(self, entity, dt)
entity.shader:use()
entity.shader:configure{
matrix={
@@ -64,7 +64,7 @@ end
update = {
filter=ecs.Filter.AND{"update"},
- update=function(entity, dt)
+ update=function(self, entity, dt)
entity.update(entity, dt)
end,
priority=50,