-
Notifications
You must be signed in to change notification settings - Fork 1
/
room-city.lua
43 lines (35 loc) · 1.02 KB
/
room-city.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
38
39
40
41
42
43
local room = {}
function room.enter()
-- switch to ship music and backdrop
switchbgmusic(worldmapmusic)
backdrop = city
-- define room objects
objects = {}
objects.ship = {
xoff = 111,
yoff = 62,
name = 'Home, sweet home.',
image = love.graphics.newImage('images/worldmap-nearshipobj.png'),
action = function ()
local result = choose('@Enter the ship.', 'Nevermind.')
if result == 1 then
rooms.enter(rooms.ship)
end
end
}
objects.dome = {
xoff = 27,
yoff = 11,
name = 'You see the Capital Dome.',
image = love.graphics.newImage('images/worldmap-domeobj.png'),
action = function ()
say 'Looks like this is the\nhub of the city.'
say 'Should I go in?'
local result = choose('@Enter the dome.', 'Nevermind.')
if result == 1 then
rooms.enter(rooms.dome)
end
end
}
end
return room