-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtryagain.lua
More file actions
84 lines (66 loc) · 1.81 KB
/
tryagain.lua
File metadata and controls
84 lines (66 loc) · 1.81 KB
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
79
80
81
82
83
84
--[[
This software is released under the MIT License. See LICENSE.txt for details.
Also, on a non-legal note: I do not recommend reading my code, especially not for educative
purposes. It was written over like three years, and I often forgot how I implemented several
things over time. Also, I was mostly drunk and listening to the Katamari Damacy soundtrack.
So yeah.
]]
function desu()
local smallnumber = 0
if smallMode then
smallnumber = 50
end
local lol = {}
lol.butts = newButtList()
lol.butts:add(newButt("return to map",centerx,centery+150 + smallnumber,function()
changeState(menuClass)
globalnumber = state.lvlnbr --???
globalpack = 1
for i=1,#worlds do
if worlds[i]==state.diffstr then
globalpack = i
end
end
end))
lol.butts:add(newButt("retry",centerx,centery - smallnumber,function()
state:load()
state.tryAgainScreen = false
end))
lol.butts.list[#lol.butts.list].keyshortcut = "(space)"
lol.returnButt = newButtList()
lol.returnButt:add(newButt("continue",centerx,centery-150,function()
state.tryAgainScreen = false
end))
for i,v in ipairs(lol.butts.list) do
v.popup = true
end
for i,v in ipairs(lol.returnButt.list) do
v.popup = true
end
function lol:click()
if state.tryAgainCanGoBack then
self.returnButt:click()
end
self.butts:click()
end
function lol:draw()
if not state.tryAgainCanGoBack then
audio:playMusic("endingfanfare", true)
end
local biglulz = false
if state.flagFurminated then
love.graphics.printf("you have been furminated", 0, centery-150, width ,"center")
biglulz = true
end
self.butts:draw()
if state.tryAgainCanGoBack then
self.returnButt:draw()
else
if not biglulz then
love.graphics.printf("what a cat-astrophe", 0, centery - 150, width, "center")
end
end
end
return lol
end
return desu