Skip to content

Instantly share code, notes, and snippets.

@dantes2023
dantes2023 / gist:31c0732c29709f8705d1
Last active August 29, 2015 14:15
1 Button with two functions
-- A Example of code with Button with two functions
local player = display.newImageRect("player.png", 160,110)
local flip = display.newImageRect("swordIcon.png", 50,40)
flip.x = W/1 - 50
flip.y = H/2 + 200
local flip2 = display.newImageRect("swordIcon.png", 50,40)
@dantes2023
dantes2023 / main.lua
Created August 25, 2014 22:01
Object Moving Along A Bezier Curve Example
local bg = display.newImage("images/bg.png")
bg.x = _W/2; bg.y = _H/2;
local car = display.newImage("images/car.png")
car.x = _W/2
car.y = _H - 250
car.name = "car"
-- understood proprierties of bezier curve
--local curve = bezier:curve({xInitial, xControlPoint1, xControlPoint2, xControlPoint3}, {yInitial, yControlPoint1, yControlPoint2, yControlPoint3})