This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("mathlib") | |
gameBoard = display.newGroup() | |
screenW = display.contentWidth | |
screenH = display.contentHeight | |
centerX = display.contentWidth/2 | |
centerY = display.contentHeight/2 | |
local mRand = math.random | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tick args | |
# defaults | |
args.state.start_x ||= 10 | |
args.state.end_x ||= 1260 | |
args.state.start_tick ||= 180 | |
args.state.duration ||= 300 | |
# calc | |
next_x = ease current_tick: args.state.tick_count, | |
start_tick: args.state.start_tick, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tick args | |
# defaults | |
args.state.start_x ||= 10 | |
args.state.end_x ||= 1260 | |
args.state.start_tick ||= 180 | |
args.state.duration ||= 300 | |
# calc | |
next_percentage = ease_percentage current_tick: args.state.tick_count, | |
start_tick: args.state.start_tick, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$screenW = 1280 | |
$screenH = 720 | |
$centerX = $screenW/2 | |
$centerY = $screenH/2 | |
def tick args | |
defaults args | |
render args | |
input args | |
calc args | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gtk.reset() | |
$xStart = 0 | |
$xLocation = 0 | |
$yLocation = 720 | |
$width = 200 | |
$height = 300 | |
$lineThickness = 2 | |
$lineSpacing = 4 | |
def defaults args | |
args.state.theBorders ||= [] |