big-refactor #106
20 changed files with 44 additions and 20 deletions
|
@ -1,7 +1,32 @@
|
||||||
|
|
||||||
|
-- time.lua :: a timer, tweener and timed switch handler.
|
||||||
|
-- This class need birb.libs.tween to work
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Copyright © 2019 Kazhnuz
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
]]
|
||||||
|
|
||||||
local TweenManager = Object:extend()
|
local TweenManager = Object:extend()
|
||||||
|
|
||||||
local tween = require "birb.libs.tween"
|
local tween = require "birb.libs.tween"
|
||||||
local Timer = require "birb.modules.world.actors.utils.timer"
|
local Timer = require "birb.classes.time.timer"
|
||||||
|
|
||||||
function TweenManager:new(subject)
|
function TweenManager:new(subject)
|
||||||
self.subject = subject
|
self.subject = subject
|
|
@ -1,5 +1,5 @@
|
||||||
local TransitionParent = Object:extend()
|
local TransitionParent = Object:extend()
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
function TransitionParent:new(func, ox, oy, fadeOut, easeIn, easeOut, duration, wait)
|
function TransitionParent:new(func, ox, oy, fadeOut, easeIn, easeOut, duration, wait)
|
||||||
self.tween = TweenManager(self)
|
self.tween = TweenManager(self)
|
||||||
|
|
|
@ -22,10 +22,9 @@
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local cwd = (...):gsub('%.baseactor$', '') .. "."
|
|
||||||
local BaseActor = Object:extend()
|
local BaseActor = Object:extend()
|
||||||
|
|
||||||
local Timer = require(cwd .. "utils.timer")
|
local Timer = require("birb.classes.time.timer")
|
||||||
|
|
||||||
-- INIT FUNCTIONS
|
-- INIT FUNCTIONS
|
||||||
-- Initialise the actor and its base functions
|
-- Initialise the actor and its base functions
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local BossHpBar = Object:extend()
|
local BossHpBar = Object:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
local ComplexHPBar = require "game.modules.gui.complexhpbar"
|
local ComplexHPBar = require "game.modules.gui.complexhpbar"
|
||||||
|
|
||||||
function BossHpBar:new(hp)
|
function BossHpBar:new(hp)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local SimpleHPBar = Object:extend()
|
local SimpleHPBar = Object:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
|
|
||||||
function SimpleHPBar:new(hp)
|
function SimpleHPBar:new(hp)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local StatusBar = Object:extend()
|
local StatusBar = Object:extend()
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local ListBox = require "birb.modules.menusystem.listbox"
|
local ListBox = require "birb.modules.menusystem.listbox"
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local RadianceMenu = ListBox:extend()
|
local RadianceMenu = ListBox:extend()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local Message = Object:extend()
|
local Message = Object:extend()
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local SPACING = 20
|
local SPACING = 20
|
||||||
local PLAYER_MESSAGE = 240 - 24
|
local PLAYER_MESSAGE = 240 - 24
|
||||||
|
|
|
@ -2,7 +2,7 @@ local Parent = Object:extend() -- On créer la classe des entitées, c'est la cl
|
||||||
|
|
||||||
local maputils = require "scenes.battlesystem.utils"
|
local maputils = require "scenes.battlesystem.utils"
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
-- INIT FUNCTION
|
-- INIT FUNCTION
|
||||||
-- Initilize the actor
|
-- Initilize the actor
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local HUD = Object:extend()
|
local HUD = Object:extend()
|
||||||
|
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
local MessageQueue = require "game.modules.messagequeue"
|
local MessageQueue = require "game.modules.messagequeue"
|
||||||
|
|
||||||
local PLAYER_HUD_HIDDEN = 240+64
|
local PLAYER_HUD_HIDDEN = 240+64
|
||||||
|
|
|
@ -9,7 +9,7 @@ local Turns = require "scenes.battlesystem.controllers"
|
||||||
local VictoryScreen = require "scenes.battlesystem.screens.victory"
|
local VictoryScreen = require "scenes.battlesystem.screens.victory"
|
||||||
local GameOverScreen = require "scenes.battlesystem.screens.gameover"
|
local GameOverScreen = require "scenes.battlesystem.screens.gameover"
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
function BattleSystem:new(battleData)
|
function BattleSystem:new(battleData)
|
||||||
BattleSystem.super.new(self)
|
BattleSystem.super.new(self)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local VictoryScreen = Object:extend()
|
local VictoryScreen = Object:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local BATTLECOMPLETE_START = 2
|
local BATTLECOMPLETE_START = 2
|
||||||
local BATTLECOMPLETE_STOP = 4
|
local BATTLECOMPLETE_STOP = 4
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local VictoryScreen = Object:extend()
|
local VictoryScreen = Object:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local BATTLECOMPLETE_START = 2
|
local BATTLECOMPLETE_START = 2
|
||||||
local BATTLECOMPLETE_STOP = 4
|
local BATTLECOMPLETE_STOP = 4
|
||||||
|
|
|
@ -3,7 +3,7 @@ local World = Object:extend()
|
||||||
local maputils = require "scenes.battlesystem.utils"
|
local maputils = require "scenes.battlesystem.utils"
|
||||||
local Map = require "game.modules.drawing.parallaxBackground"
|
local Map = require "game.modules.drawing.parallaxBackground"
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local POSITIONS = {
|
local POSITIONS = {
|
||||||
{x = 3, y = 4},
|
{x = 3, y = 4},
|
||||||
|
|
|
@ -9,7 +9,7 @@ local itemutils = require "game.utils.items"
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
local MenuBack = require "game.modules.gui.menuback"
|
local MenuBack = require "game.modules.gui.menuback"
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
function DebugMenu:new()
|
function DebugMenu:new()
|
||||||
DebugMenu.super.new(self)
|
DebugMenu.super.new(self)
|
||||||
|
|
|
@ -25,7 +25,7 @@ local Scene = require "birb.modules.scenes"
|
||||||
local TitleScreen = Scene:extend()
|
local TitleScreen = Scene:extend()
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
local Background = require "game.modules.drawing.parallaxBackground"
|
local Background = require "game.modules.drawing.parallaxBackground"
|
||||||
local Menu = require "scenes.menus.titlescreen.menu"
|
local Menu = require "scenes.menus.titlescreen.menu"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local Parent = require "scenes.overworld.actors.parent"
|
local Parent = require "scenes.overworld.actors.parent"
|
||||||
local Player = Parent:extend()
|
local Player = Parent:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
local Team = require "scenes.overworld.actors.player.team"
|
local Team = require "scenes.overworld.actors.player.team"
|
||||||
local Interactions = require "scenes.overworld.actors.player.interactions"
|
local Interactions = require "scenes.overworld.actors.player.interactions"
|
||||||
local Actions = require "scenes.overworld.actors.player.actions"
|
local Actions = require "scenes.overworld.actors.player.actions"
|
||||||
|
|
|
@ -30,7 +30,7 @@ local CharsetManager = require "scenes.overworld.charsetmanager"
|
||||||
local screens = require "scenes.overworld.screens"
|
local screens = require "scenes.overworld.screens"
|
||||||
|
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local EventManager = require "game.events"
|
local EventManager = require "game.events"
|
||||||
local MessageQueue = require "game.modules.messagequeue"
|
local MessageQueue = require "game.modules.messagequeue"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local BaseScreen = require "scenes.overworld.screens.parent"
|
local BaseScreen = require "scenes.overworld.screens.parent"
|
||||||
local GameOver = BaseScreen:extend()
|
local GameOver = BaseScreen:extend()
|
||||||
|
|
||||||
local TweenManager = require "game.modules.tweenmanager"
|
local TweenManager = require "birb.classes.time"
|
||||||
|
|
||||||
local gui = require "game.modules.gui"
|
local gui = require "game.modules.gui"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue