more naming convention
now there are spawn objects! now entity spawns are loaded from level! now entity spawns are saved to level!
This commit is contained in:
parent
a8ffae726f
commit
0acbfd5e9d
@ -10,10 +10,10 @@ LoadedObjects.Rooms = {}
|
||||
--[[
|
||||
Collision
|
||||
|
||||
[bool flag] isDisabled
|
||||
[bool flag] is_disabled
|
||||
> if true used for collision
|
||||
|
||||
[bool flag] isColliding
|
||||
[bool flag] is_colliding
|
||||
> if true, this collision is colliding
|
||||
|
||||
[vec2 position] from - x, y
|
||||
@ -31,7 +31,7 @@ LoadedObjects.Rooms = {}
|
||||
|
||||
-- can also be called with only ox and oy, where they become the width and height instead
|
||||
function Collision:new(ox,oy,tx,ty)
|
||||
local o = {isColliding = false, isDisabled = false}
|
||||
local o = {is_colliding = false, is_disabled = false}
|
||||
|
||||
if tx ~= nil and ty ~= nil then
|
||||
o.from = {x = ox, y = oy}
|
||||
@ -77,7 +77,7 @@ function Collision:containsPoint(x, y)
|
||||
end
|
||||
|
||||
function Collision:draw(color)
|
||||
if self.isColliding == true then
|
||||
if self.is_colliding == true then
|
||||
love.graphics.setColor(0,1,0,0.5)
|
||||
elseif color == 1 then
|
||||
love.graphics.setColor(1,0,0,0.5)
|
||||
|
@ -21,8 +21,6 @@ function debugUI()
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
-- player isOnGroundCheck
|
||||
--love.graphics.main_Player
|
||||
love.graphics.setColor(1,0,0)
|
||||
end
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
Arrow = Entity:new()
|
||||
Arrow.type = "Arrow"
|
||||
|
||||
|
||||
function Arrow:new(x,y,rotation,speed)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "arrow"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
o.speed = speed or 10
|
||||
o.sprite_rotation = rotation or 0
|
||||
|
@ -1,9 +1,9 @@
|
||||
CursedBook = Entity:new()
|
||||
CursedBook.type = "CursedBook"
|
||||
|
||||
function CursedBook:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "cursed_book"
|
||||
-- behaviour
|
||||
o.pos = {x = x, y = y}
|
||||
o.speed = 0.01
|
||||
|
@ -1,10 +1,9 @@
|
||||
Decoration = Entity:new()
|
||||
Decoration.type = "Decoration"
|
||||
|
||||
function Decoration:new(x,y,animation,light_radius)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "decoration"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
|
||||
-- animations
|
||||
|
@ -1,10 +1,9 @@
|
||||
Fairy = Entity:new()
|
||||
Fairy.type = "Fairy"
|
||||
|
||||
function Fairy:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "fairy"
|
||||
|
||||
-- behaviour
|
||||
o.pos = {x = x, y = y}
|
||||
o.speed = 1.4
|
||||
|
@ -1,9 +1,9 @@
|
||||
HookAnchor = Entity:new()
|
||||
HookAnchor.type = "HookAnchor"
|
||||
|
||||
function HookAnchor:new(x,y,hook_distance)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "hook_anchor"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
o.hook_distance = hook_distance or 100
|
||||
|
@ -1,10 +1,9 @@
|
||||
Kupo = Entity:new()
|
||||
Kupo.type = "Kupo"
|
||||
|
||||
function Kupo:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "kupo"
|
||||
|
||||
o.pos = {x = x, y = y}
|
||||
o.speed = 20
|
||||
o.range = 200
|
||||
@ -142,7 +141,7 @@ function Kupo:handleAnimation()
|
||||
if self.vel.x ~= 0 then self.sprite_flip.x = math.sign(self.vel.x) end
|
||||
|
||||
self.body:animate()
|
||||
self:Draw(self.body)
|
||||
self:draw(self.body)
|
||||
|
||||
if self.draw_bow == true then
|
||||
self.bow:drawFrame(
|
||||
|
@ -1,6 +1,8 @@
|
||||
Particle = Entity:new()
|
||||
LoadedObjects.Particles = {}
|
||||
|
||||
Particle = Entity:new()
|
||||
Particle.type = "Particle"
|
||||
|
||||
function Particle:new(x,y,particle_data)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Player = Entity:new()
|
||||
Player.type = "Player"
|
||||
|
||||
function Player:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
o.type = "player"
|
||||
-- physics
|
||||
o.zero_speed = 0.01 -- gameworld pixels
|
||||
|
||||
@ -166,7 +166,7 @@ function Player:doLogic()
|
||||
if self.is_hooked then
|
||||
self:unhook()
|
||||
else
|
||||
local anchor = self:checkNearest("hook_anchor",self.hook_distance)
|
||||
local anchor = self:checkNearest("HookAnchor",self.hook_distance)
|
||||
if anchor then
|
||||
self.is_hooked = true
|
||||
self.hook_distance = anchor.hook_distance
|
||||
|
@ -179,7 +179,7 @@ function Entity:getCollidingAt(x,y,object)
|
||||
and y + self.box.from.y < collision.to.y
|
||||
and y + self.box.to.y > collision.from.y
|
||||
then
|
||||
collision.isColliding = true
|
||||
collision.is_colliding = true
|
||||
return collision
|
||||
end
|
||||
end
|
||||
|
@ -39,9 +39,9 @@ function stepGame()
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.debug.reload) then
|
||||
MenuClear()
|
||||
clearMenu()
|
||||
menu_type = "dialog"
|
||||
MenuInit("dialog",DialogSequence.Example)
|
||||
initMenu("dialog",dialog_sequence.example)
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.debug.editor) then
|
||||
|
@ -46,6 +46,24 @@ function exportLevel(levelname, filename)
|
||||
exportFile:write("\n },")
|
||||
logPrint("- objects")
|
||||
exportFile:write("\n objects = {")
|
||||
logPrint(" - spawns")
|
||||
exportFile:write("\n spawns = {")
|
||||
for i, v in ipairs(LoadedObjects.Spawns) do
|
||||
if i > 1 then
|
||||
exportFile:write(",")
|
||||
end
|
||||
exportFile:write("\n {")
|
||||
exportFile:write(v.archetype.type)
|
||||
exportFile:write(",{")
|
||||
for i=1, #v.args do
|
||||
if i > 1 then
|
||||
exportFile:write(",")
|
||||
end
|
||||
exportFile:write(v.args[i])
|
||||
end
|
||||
exportFile:write("}}")
|
||||
end
|
||||
exportFile:write("\n },")
|
||||
logPrint(" - rooms")
|
||||
exportFile:write("\n rooms = {")
|
||||
for i, room in ipairs(LoadedObjects.Rooms) do
|
||||
@ -82,22 +100,6 @@ function scandir(directory)
|
||||
return t
|
||||
end
|
||||
|
||||
--[[
|
||||
return {
|
||||
name = "level1",
|
||||
tileset = tileset.library,
|
||||
tiles = {
|
||||
{13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13},
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, 5,25,26, 6,25,26, 7, 0, 5,25,26, 7, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, 5,37,38, 6,37,38, 7, 0, 5,37,38, 7, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, 5,37,38, 6,37,38, 7, 0, 5,37,38, 7, 0, 0, 0, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, 5,49,50, 6,49,50, 7, 0, 5,49,50, 7, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
|
||||
},
|
||||
objects = {}
|
||||
}
|
||||
]]
|
||||
if logging then
|
||||
-- Make log stuff
|
||||
os.execute( "mkdir \"./logs\"" )
|
||||
|
@ -110,6 +110,7 @@ function Keybind:default()
|
||||
Keybind.debug.editor = { keys = {"f4"}}
|
||||
Keybind.debug.recording = { keys = {"f5"}}
|
||||
Keybind.debug.playback = { keys = {"f6"}}
|
||||
Keybind.debug.respawn = { keys = {"f8"}}
|
||||
|
||||
-- Editor
|
||||
Keybind.editor.palette_mode = { keys = {"tab"}}
|
||||
|
@ -18,14 +18,23 @@ function loadLevelTiles()
|
||||
indexLevelTiles()
|
||||
createTileObjects()
|
||||
createRoomObjects()
|
||||
getSpawns()
|
||||
end
|
||||
|
||||
function createRoomObjects()
|
||||
LoadedObjects.Rooms = {}
|
||||
for _, v in pairs(LevelData.objects.rooms) do
|
||||
table.insert(LoadedObjects.Rooms, Collision:new(v[1][1],v[1][2],v[2][1],v[2][2]))
|
||||
end
|
||||
end
|
||||
|
||||
function getSpawns()
|
||||
LoadedObjects.Spawns = {}
|
||||
for _, v in pairs(LevelData.objects.spawns) do
|
||||
addSpawn(v[1],unpack(v[2]))
|
||||
end
|
||||
end
|
||||
|
||||
function expandLevelCanvas(horizontal,vertical)
|
||||
local horizontal = horizontal or 0
|
||||
local vertical = vertical or 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
function drawMenu(menu)
|
||||
local font = love.graphics.getFont()
|
||||
love.graphics.setFont(LocaleFont)
|
||||
love.graphics.setFont(locale_font)
|
||||
|
||||
-- reset scale
|
||||
love.graphics.setScale()
|
||||
@ -54,19 +54,19 @@ function stepMenu(menu)
|
||||
end
|
||||
|
||||
function stepMenuPauseScreen()
|
||||
if PauseResume:getVariable() == true then
|
||||
PauseResume = nil
|
||||
PauseOptions = nil
|
||||
PauseExit = nil
|
||||
if pause_resume:getVariable() == true then
|
||||
pause_resume = nil
|
||||
pause_options = nil
|
||||
pause_exit = nil
|
||||
exitMenu()
|
||||
elseif PauseExit:getVariable() == true then
|
||||
elseif pause_exit:getVariable() == true then
|
||||
love.event.quit()
|
||||
end
|
||||
end
|
||||
|
||||
function stepMenuDialog()
|
||||
if DialogContainer.value >= DialogContainer.target_value then
|
||||
DialogContainer = nil
|
||||
if dialog_container.value >= dialog_container.target_value then
|
||||
dialog_container = nil
|
||||
exitMenu()
|
||||
end
|
||||
end
|
||||
@ -90,55 +90,55 @@ function initMenu(menu,parameter)
|
||||
initMenuPauseScreen()
|
||||
elseif menu == "dialog" then
|
||||
if parameter == nil then
|
||||
parameter = DialogSequence.Example
|
||||
parameter = dialog_sequence.Example
|
||||
end
|
||||
initMenuDialog(parameter)
|
||||
end
|
||||
end
|
||||
|
||||
function initMenuDialog(parameter)
|
||||
DialogContainer = interfaceDialog:new()
|
||||
DialogContainer:loadSequence(parameter)
|
||||
dialog_container = InterfaceDialog:new()
|
||||
dialog_container:loadSequence(parameter)
|
||||
end
|
||||
|
||||
function initMenuPauseScreen()
|
||||
local buttonStandard = {width = 200, height = 30, separation = 10}
|
||||
local button_standard = {width = 200, height = 30, separation = 10}
|
||||
-- elements
|
||||
PauseResume = InterfaceButton:new(
|
||||
pause_resume = InterfaceButton:new(
|
||||
game.width/2,
|
||||
game.height/2-buttonStandard.height-buttonStandard.separation,
|
||||
buttonStandard.width,
|
||||
buttonStandard.height,
|
||||
game.height/2-button_standard.height-button_standard.separation,
|
||||
button_standard.width,
|
||||
button_standard.height,
|
||||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = Locale.ui.pause_screen_resume,
|
||||
text = locale.ui.pause_screen_resume,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
)
|
||||
PauseOptions = InterfaceButton:new(
|
||||
pause_options = InterfaceButton:new(
|
||||
game.width/2,
|
||||
game.height/2,
|
||||
buttonStandard.width,
|
||||
buttonStandard.height,
|
||||
button_standard.width,
|
||||
button_standard.height,
|
||||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = Locale.ui.pause_screen_options,
|
||||
text = locale.ui.pause_screen_options,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
)
|
||||
PauseExit = InterfaceButton:new(
|
||||
pause_exit = InterfaceButton:new(
|
||||
game.width/2,
|
||||
game.height/2+buttonStandard.height+buttonStandard.separation,
|
||||
buttonStandard.width,
|
||||
buttonStandard.height,
|
||||
game.height/2+button_standard.height+button_standard.separation,
|
||||
button_standard.width,
|
||||
button_standard.height,
|
||||
{false,true},
|
||||
1,
|
||||
{
|
||||
text = Locale.ui.pause_screen_exit,
|
||||
text = locale.ui.pause_screen_exit,
|
||||
color = {0,0,0.5},
|
||||
color2 = {1,1,1}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ function LoadedObjects.drawCollisions()
|
||||
end
|
||||
|
||||
for _, platform in pairs(LoadedObjects.Platforms) do
|
||||
if platform.disable == true then platform:Draw(2) end
|
||||
if platform.disable == false then platform:Draw(1) end
|
||||
if platform.is_disabled == true then platform:Draw(2) end
|
||||
if platform.is_disabled == false then platform:Draw(1) end
|
||||
end
|
||||
|
||||
for _, ladder in pairs(LoadedObjects.Ladders) do
|
||||
@ -23,13 +23,13 @@ end
|
||||
-- returns true if theres a collision at that point
|
||||
function isThereObjectAt(x,y,objectType)
|
||||
for _, object in pairs(objectType) do
|
||||
if object.disable then
|
||||
if object.is_disabled then
|
||||
-- Dont calculate if dissabled
|
||||
elseif x >= object.from.x
|
||||
and x <= object.to.x
|
||||
and y >= object.from.y
|
||||
and y <= object.to.y then
|
||||
object.isColliding = true
|
||||
object.is_colliding = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
@ -54,21 +54,21 @@ function setCollisionFlags()
|
||||
}
|
||||
for _, type in pairs(Check) do
|
||||
for _, object in pairs(type) do
|
||||
object.isColliding = false
|
||||
object.is_colliding = false
|
||||
end
|
||||
end
|
||||
for _, platform in pairs(LoadedObjects.Platforms) do
|
||||
if main_Player.pos.y < platform.from.y then
|
||||
platform.disable = false
|
||||
if main_player.pos.y < platform.from.y then
|
||||
platform.is_disabled = false
|
||||
else
|
||||
platform.disable = true
|
||||
platform.is_disabled = true
|
||||
end
|
||||
end
|
||||
for _, platform in pairs(LoadedObjects.Hazards) do
|
||||
if main_Player.isOnGround then
|
||||
platform.disable = true
|
||||
if main_player.isOnGround then
|
||||
platform.is_disabled = true
|
||||
else
|
||||
platform.disable = false
|
||||
platform.is_disabled = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -22,6 +22,7 @@ require "code/queue"
|
||||
|
||||
-- objects
|
||||
require "code/entity"
|
||||
require "code/spawn"
|
||||
require "code/canvas"
|
||||
require "code/collision"
|
||||
require "code/lights"
|
||||
|
15
code/spawn.lua
Normal file
15
code/spawn.lua
Normal file
@ -0,0 +1,15 @@
|
||||
LoadedObjects.Spawns = {}
|
||||
|
||||
function addSpawn(archetype, ...)
|
||||
local o = {
|
||||
archetype = archetype,
|
||||
args = {...}
|
||||
}
|
||||
table.insert(LoadedObjects.Spawns, o)
|
||||
end
|
||||
|
||||
function activateSpawns()
|
||||
for _, spawn in pairs(LoadedObjects.Spawns) do
|
||||
spawn.archetype:new(unpack(spawn.args))
|
||||
end
|
||||
end
|
@ -1,7 +1,7 @@
|
||||
dialog_sequence = {}
|
||||
|
||||
dialog_sequence.Example = {
|
||||
{Locale.dialogue.example[1],Locale.name.fairy},
|
||||
{Locale.dialogue.example[2],Locale.name.chaos},
|
||||
{Locale.dialogue.example[3],Locale.name.life}
|
||||
dialog_sequence.example = {
|
||||
{locale.dialogue.example[1],locale.name.fairy},
|
||||
{locale.dialogue.example[2],locale.name.chaos},
|
||||
{locale.dialogue.example[3],locale.name.life}
|
||||
}
|
||||
|
@ -2,38 +2,41 @@ return {
|
||||
name = "unnamed",
|
||||
tileset = tileset.library,
|
||||
properties = {
|
||||
darkness = true
|
||||
darkness = false
|
||||
},
|
||||
tiles = {
|
||||
{ 4, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
|
||||
{ 4, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
|
||||
{ 4, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
|
||||
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
|
||||
},
|
||||
objects = {
|
||||
spawns = {
|
||||
{Fairy,{100,88}},
|
||||
{HookAnchor,{200,89,100}},
|
||||
{HookAnchor,{400,89,120}}
|
||||
},
|
||||
rooms = {
|
||||
{{16,0},{128,208}},
|
||||
{{96,128},{272,240}},
|
||||
{{224,80},{336,192}},
|
||||
{{400,32},{560,352}}
|
||||
}
|
||||
{{96,64},{544,320}},
|
||||
{{0,0},{112,176}}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
LocaleFont = love.graphics.getFont()
|
||||
locale_font = love.graphics.getFont()
|
||||
|
||||
Locale = {}
|
||||
locale = {}
|
||||
|
||||
Locale.ui = {}
|
||||
Locale.ui.pause_screen_resume = "Resume"
|
||||
Locale.ui.pause_screen_options = "Options"
|
||||
Locale.ui.pause_screen_exit = "Exit"
|
||||
locale.ui = {}
|
||||
locale.ui.pause_screen_resume = "Resume"
|
||||
locale.ui.pause_screen_options = "Options"
|
||||
locale.ui.pause_screen_exit = "Exit"
|
||||
|
||||
Locale.name = {}
|
||||
Locale.name.fairy = "Ozy"
|
||||
Locale.name.chaos = "Aelato"
|
||||
Locale.name.life = "Olidia"
|
||||
locale.name = {}
|
||||
locale.name.fairy = "Ozy"
|
||||
locale.name.chaos = "Aelato"
|
||||
locale.name.life = "Olidia"
|
||||
|
||||
Locale.dialogue = {}
|
||||
Locale.dialogue.example = {"Hello!","Duh.","Lol"}
|
||||
locale.dialogue = {}
|
||||
locale.dialogue.example = {"Hello!","Duh.","Lol"}
|
||||
|
@ -1,16 +1,16 @@
|
||||
LocaleFont = love.graphics.newFont("assets/ui/fonts/heon.ttf",18)
|
||||
locale_font = love.graphics.newFont("assets/ui/fonts/heon.ttf",18)
|
||||
|
||||
Locale = {}
|
||||
locale = {}
|
||||
|
||||
Locale.ui = {}
|
||||
Locale.ui.pause_screen_resume = ""
|
||||
Locale.ui.pause_screen_options = ""
|
||||
Locale.ui.pause_screen_exit = ""
|
||||
locale.ui = {}
|
||||
locale.ui.pause_screen_resume = ""
|
||||
locale.ui.pause_screen_options = ""
|
||||
locale.ui.pause_screen_exit = ""
|
||||
|
||||
Locale.name = {}
|
||||
Locale.name.fairy = ""
|
||||
Locale.name.chaos = ""
|
||||
Locale.name.life = ""
|
||||
locale.name = {}
|
||||
locale.name.fairy = ""
|
||||
locale.name.chaos = ""
|
||||
locale.name.life = ""
|
||||
|
||||
Locale.dialogue = {}
|
||||
Locale.dialogue.example = {"","",""}
|
||||
locale.dialogue = {}
|
||||
locale.dialogue.example = {"","",""}
|
||||
|
12
main.lua
12
main.lua
@ -53,13 +53,7 @@ function love.load()
|
||||
|
||||
main_player = Player:new(75,50)
|
||||
|
||||
--Kupo:new(100,150)
|
||||
--Kupo:new(300,150)
|
||||
HookAnchor:new(200,89)
|
||||
HookAnchor:new(400,89)
|
||||
Fairy:new(200,88)
|
||||
--CursedBook:new(180,68)
|
||||
|
||||
activateSpawns()
|
||||
--love.audio.play(music.placeholder)
|
||||
end
|
||||
|
||||
@ -109,6 +103,10 @@ function love.update(dt)
|
||||
return
|
||||
end
|
||||
|
||||
if Keybind:checkPressed(Keybind.debug.respawn) then
|
||||
activateSpawns()
|
||||
end
|
||||
|
||||
if love.keyboard.isDown("f7") then
|
||||
local test_prompt = Prompt:new({
|
||||
name = "test prompt",
|
||||
|
Loading…
Reference in New Issue
Block a user