summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/collide.lua3
-rw-r--r--scripts/update.lua6
2 files changed, 9 insertions, 0 deletions
diff --git a/scripts/collide.lua b/scripts/collide.lua
new file mode 100644
index 0000000..382f5d7
--- /dev/null
+++ b/scripts/collide.lua
@@ -0,0 +1,3 @@
+return function(db, id, other, collisions)
+ print(honey.glfw.GetTime(), "collide with: ", other)
+end
diff --git a/scripts/update.lua b/scripts/update.lua
new file mode 100644
index 0000000..906fc17
--- /dev/null
+++ b/scripts/update.lua
@@ -0,0 +1,6 @@
+return function(db, id, dt)
+ local node = db:getComponent(id, "node")
+ --local t = honey.glfw.GetTime()
+ --node.matrix[2][4] = 2*math.sin(2*t)
+ node.matrix:rotateZ(math.pi*dt)
+end