-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
45 lines (34 loc) · 1003 Bytes
/
main.lua
File metadata and controls
45 lines (34 loc) · 1003 Bytes
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
38
39
40
41
42
43
--
-- main.lua
-- redditgamejam-05
--
-- Created by Jay Roberts on 2010-12-10.
-- Copyright 2010 GloryFish.org. All rights reserved.
--
require 'gamestate'
require 'input'
require 'scene_menu'
function love.load()
love.graphics.setCaption('Unrequited by Jay Roberts')
debug = false
-- Seed random
local seed = os.time()
math.randomseed(seed);
math.random(); math.random(); math.random()
fonts = {
default = love.graphics.newFont('resources/fonts/silk.ttf', 24),
large = love.graphics.newFont('resources/fonts/silk.ttf', 48)
}
music = {
title = love.audio.newSource("resources/music/titlemusic.mp3", 'stream'),
game = love.audio.newSource("resources/music/gamemusic.mp3", 'stream'),
gameover = love.audio.newSource("resources/music/gameovermusic.mp3", 'stream')
}
music.title:setLooping(true)
music.game:setLooping(true)
input = Input()
Gamestate.registerEvents()
Gamestate.switch(menu)
end
function love.update(dt)
end