-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroom-call.lua
78 lines (64 loc) · 2 KB
/
room-call.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
local room = {}
function room.update()
-- Update the scanline animation.
if scanlineoffset >= -39 then
scanlineoffset = -108
else
scanlineoffset = scanlineoffset + 1
end
end
function room.draw()
-- Draw Jyesula with the scanline effect.
if jyesulavisible then
love.graphics.setCanvas(scancanvas)
love.graphics.push()
love.graphics.scale(0.25, 0.25)
love.graphics.clear(0, 0, 0, 0)
love.graphics.draw(scanline, 0, scanlineoffset + 69)
love.graphics.draw(scanline, 0, scanlineoffset)
love.graphics.pop()
love.graphics.setCanvas()
love.graphics.setCanvas(canvas)
love.graphics.push()
love.graphics.scale(0.25, 0.25)
love.graphics.clear(0, 0, 0, 0)
love.graphics.setBlendMode('alpha')
love.graphics.draw(jyesula, 0, 0)
love.graphics.setBlendMode('multiply')
love.graphics.draw(scancanvas)
love.graphics.setBlendMode('alpha')
love.graphics.pop()
love.graphics.setCanvas()
love.graphics.draw(canvas, 0, 0)
end
end
local function introaction()
backdrop = love.graphics.newImage('images/comm.png')
currentbgmusic:setVolume(0.1)
dial:play()
dialog.fadein(200)
dialog.pause(400)
jyesulavisible = true
dialog.pause(20)
currentbgmusic:setVolume(1.0)
say 'Do you have news, Agent?'
local result = choose('Uh...', 'Is your refridgerator running?',
'Apologies, wrong number.')
if result == 1 then
say 'I told you not to\ncall until you have news.'
say 'Good luck, Agent.'
elseif result == 2 then
say 'Please do your job, Agent.'
elseif result == 3 then
say 'Good luck, Agent.'
end
dialog.fadeout(200)
rooms.enter(rooms.ship)
end
function room.enter()
scanlineoffset = 0
jyesulavisible = false
objects = {}
dialog.start(introaction)
end
return room