From cf4a8bcd9242ffc0016f2923a066189969c1f164 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 21 Mar 2021 16:20:13 +0100 Subject: [PATCH] chore: fix overworld class name --- sonic-radiance.love/scenes/overworld/init.lua | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sonic-radiance.love/scenes/overworld/init.lua b/sonic-radiance.love/scenes/overworld/init.lua index 2cc8374..bcfd5fd 100644 --- a/sonic-radiance.love/scenes/overworld/init.lua +++ b/sonic-radiance.love/scenes/overworld/init.lua @@ -22,7 +22,7 @@ ]] local Scene = require "core.modules.scenes" -local MovePlayer = Scene:extend() +local OverWorld = Scene:extend() local World = require "scenes.overworld.world" local CharsetManager = require "scenes.overworld.charsetmanager" @@ -36,8 +36,8 @@ local EventManager = require "game.events" local PLAYER_MESSAGE = 240 - 32 -function MovePlayer:new() - MovePlayer.super.new(self) +function OverWorld:new() + OverWorld.super.new(self) self.charsetManager = CharsetManager(self) self.assets:batchImport("game.modules.gui.assets") self.assets:batchImport("scenes.overworld.assets") @@ -66,29 +66,29 @@ function MovePlayer:new() self.events = EventManager(self) end -function MovePlayer:startEvent() +function OverWorld:startEvent() self.world.isActive = false end -function MovePlayer:endEvent() +function OverWorld:endEvent() self.world.isActive = true end -function MovePlayer:showMessage(message) +function OverWorld:showMessage(message) self.message = message self.messageOpacity = 1 self.tweens:newTween(0, 0.2, {messageOpacity = 1}, 'inOutCubic') self.tweens:newTween(1, 0.2, {messageOpacity = 0}, 'inOutCubic') end -function MovePlayer:registerScreen(screen) +function OverWorld:registerScreen(screen) if (self.currentScreen ~= nil) then self.currentScreen:quit() end self.currentScreen = screen end -function MovePlayer:update(dt) +function OverWorld:update(dt) local keys = self:getKeys(1) self.tweens:update(dt) self.events:update(dt) @@ -110,7 +110,7 @@ function MovePlayer:update(dt) end end -function MovePlayer:pause() +function OverWorld:pause() self.tweens:newTween(0,0.2, {backGroundOpacity=0.75}, "inQuad") self.tweens:newTween(0,0.3, {borderPosition=30}, "inOutQuad") self.tweens:newTween(0, 0.3, {emblemPosition=456}, "inOutQuad") @@ -121,7 +121,7 @@ function MovePlayer:pause() screens.mainmenu.pause(self) end -function MovePlayer:unpause() +function OverWorld:unpause() self.tweens:newTween(0.1, 0.2, {backGroundOpacity=0}, "inQuad") self.tweens:newTween(0, 0.3, {borderPosition=0}, "inOutQuad") self.tweens:newTween(0, 0.3, {emblemPosition=368}, "inOutQuad") @@ -135,15 +135,15 @@ function MovePlayer:unpause() end end -function MovePlayer:quitScreen() +function OverWorld:quitScreen() self.currentScreen = nil end -function MovePlayer:getEmblemsPosition() +function OverWorld:getEmblemsPosition() return self.emblemPosition end -function MovePlayer:draw() +function OverWorld:draw() love.graphics.setColor(0, 0, 0, self.backGroundOpacity) love.graphics.rectangle("fill", 0, 0, 424, 240) utils.graphics.resetColor() @@ -176,4 +176,4 @@ function MovePlayer:draw() utils.graphics.resetColor() end -return MovePlayer +return OverWorld