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:
lustlion
2022-03-08 09:34:51 +01:00
parent a8ffae726f
commit 0acbfd5e9d
24 changed files with 165 additions and 139 deletions

View File

@@ -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}
}