Skip to content

Instantly share code, notes, and snippets.

@tonetheman
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save tonetheman/e2bf92d357c77b3e0a8c to your computer and use it in GitHub Desktop.

Select an option

Save tonetheman/e2bf92d357c77b3e0a8c to your computer and use it in GitHub Desktop.
tween_flux_test.lua
local flux= require("flux")
local t={}
function love.load()
end
function love.draw()
for k,v in pairs(t) do
love.graphics.setColor(255,0,0,v.op)
love.graphics.print(v.val, v.x, v.y)
end
end
function love.update(dt)
flux.update(dt)
end
function love.mousereleased(x,y,button)
local txt = {x=x,y=y,val="hey",op=255}
table.insert(t, txt)
flux.to(txt, 3 , { x=0,y=0,op=0 }):oncomplete(
function ()
print("done")
end
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment