mirror of
https://github.com/love2d/love-android.git
synced 2026-08-19 12:14:49 +02:00
actual cool scripting
This commit is contained in:
+11
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user