Add font assets.
|
@ -0,0 +1,4 @@
|
|||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=Documents
|
70
main.lua
|
@ -1,4 +1,70 @@
|
|||
local love = love
|
||||
function love.draw()
|
||||
love.graphics.print("Hello World!", 400, 300)
|
||||
local sound
|
||||
local beat = {
|
||||
t = 0,
|
||||
dt = 0,
|
||||
}
|
||||
local wave = {
|
||||
x = { 1.0, 0.0, -0.5, 0.2, 0.4, 0.8, 0.3, 0.9, -0.4, 0.8, 0.5, 0.1, -0.9 },
|
||||
dx = { 1.0, 0.0, -0.5, 0.2, 0.4, 0.8, 0.3, 0.9, -0.4, 0.8, 0.5, 0.1, -0.9 },
|
||||
ddx = { 1.0, 0.0, -0.5, 0.2, 0.4, 0.8, 0.3, 0.9, -0.4, 0.8, 0.5, 0.1, -0.9 },
|
||||
X = function(th) end,
|
||||
DX = function(th) end,
|
||||
DDX = function(th) end,
|
||||
Draw = function() end,
|
||||
AddImpulse = function( th, size ) end,
|
||||
|
||||
ImpactPoint = function( xi, yi, xf, yf )
|
||||
local impact = { r = 0, th = 0, x = 0, y = 0, dx = 0, dy = 0 }
|
||||
return impact
|
||||
end,
|
||||
|
||||
Update = function( dt ) end,
|
||||
}
|
||||
|
||||
--Set up all the game state I need.
|
||||
local function NewGame()
|
||||
beat.t = love.timer.getTime()
|
||||
beat.dt = 0
|
||||
end
|
||||
|
||||
local function OnImpact()
|
||||
--Update beat timer.
|
||||
local t = love.timer.getTime()
|
||||
beat.dt = t - beat.t
|
||||
beat.t = t
|
||||
|
||||
--Handle sound.
|
||||
love.audio.play(sound)
|
||||
end
|
||||
|
||||
local function OnVictory()
|
||||
|
||||
end
|
||||
|
||||
function love.draw()
|
||||
love.graphics.setColor(1.0, 1.0, 1.0)
|
||||
love.graphics.print("Hello World!", 400, 300)
|
||||
love.graphics.print( beat.t, 0, 0 )
|
||||
love.graphics.print( beat.dt, 0, 100 )
|
||||
love.graphics.setColor(0, 0.4, 0.4)
|
||||
--love.graphics.circle("fill", 0, 0, 10)
|
||||
end
|
||||
|
||||
function love.load()
|
||||
sound = love.audio.newSource("soundTest.ogg", "static")
|
||||
|
||||
return NewGame()
|
||||
|
||||
end
|
||||
|
||||
function love.update( dt )
|
||||
|
||||
end
|
||||
|
||||
|
||||
function love.keypressed( key, code, isRepeat )
|
||||
if key == "escape" then return love.event.quit() end
|
||||
if key == "w" then return OnImpact( ) end
|
||||
if key == "enter" then return NewGame() end
|
||||
end
|
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 790 B |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 855 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 899 B |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 886 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 772 B |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 771 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 789 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 471 B |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 651 B |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.1 KiB |