-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.lua
39 lines (32 loc) · 838 Bytes
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--
-- Rogue Beach, CA
--
-- A roguelike surfing game.
--
-- (C) 2012-2013 Thomas R. Koll
require 'lib/middleclass'
require 'game'
require 'views/view'
require 'game_states/game_state'
require 'game_states/start_menu'
require 'game_states/map_state'
require 'game_states/finish_screen'
function love.load()
game:createFonts(0)
game:startMenu()
love.audio.play(game.sounds.music[1])
love.graphics.setMode(love.graphics.getWidth(), love.graphics.getHeight(), game.graphics.fullscreen)
--game:start()
end
function love.draw()
if not game.current_state then return end
game.current_state:draw()
end
function love.keypressed(key)
if not game.current_state then return end
game.current_state:keypressed(key)
end
function love.update(dt)
if not game.current_state then return end
game.current_state:update(dt)
end