actual cool scripting

This commit is contained in:
Martin Felis
2013-12-04 19:25:03 +01:00
parent db5083d46e
commit 3614649365
3 changed files with 59 additions and 25 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
engine.log("logginf from FIIILLLEEEE")
engine.log("Log Message from Lua ;D")
engine.set_color (1., 0., 0.)
function on_touch(x, y)
engine.log ("got touch at " .. tostring(x) .. "," .. tostring(y))
engine.set_color (0., 1., 0.)
end
function update(dt)
r,g,b = engine.get_color()
r = math.max(0., r - dt * 0.4)
g = math.max(0., g - dt * 0.4)
b = math.max(0., b - dt * 0.4)
engine.set_color (r, g, b)
end