mirror of
https://github.com/love2d/love-android.git
synced 2026-08-12 16:41:12 +02:00
18 lines
383 B
Lua
18 lines
383 B
Lua
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
|