chore: put tweenmanager into the class folder

This commit is contained in:
Kazhnuz 2021-05-05 11:41:25 +02:00
parent d165fc4181
commit 61a3206a95
20 changed files with 44 additions and 20 deletions

View file

@ -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 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)
self.subject = subject

View file

@ -1,5 +1,5 @@
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)
self.tween = TweenManager(self)

View file

@ -22,10 +22,9 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local cwd = (...):gsub('%.baseactor$', '') .. "."
local BaseActor = Object:extend()
local Timer = require(cwd .. "utils.timer")
local Timer = require("birb.classes.time.timer")
-- INIT FUNCTIONS
-- Initialise the actor and its base functions

View file

@ -1,6 +1,6 @@
local BossHpBar = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local ComplexHPBar = require "game.modules.gui.complexhpbar"
function BossHpBar:new(hp)

View file

@ -1,6 +1,6 @@
local SimpleHPBar = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local gui = require "game.modules.gui"
function SimpleHPBar:new(hp)

View file

@ -1,5 +1,5 @@
local StatusBar = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local gui = require "game.modules.gui"

View file

@ -1,5 +1,5 @@
local ListBox = require "birb.modules.menusystem.listbox"
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local RadianceMenu = ListBox:extend()

View file

@ -1,5 +1,5 @@
local Message = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local SPACING = 20
local PLAYER_MESSAGE = 240 - 24

View file

@ -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 TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
-- INIT FUNCTION
-- Initilize the actor

View file

@ -1,7 +1,7 @@
local HUD = Object:extend()
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 PLAYER_HUD_HIDDEN = 240+64

View file

@ -9,7 +9,7 @@ local Turns = require "scenes.battlesystem.controllers"
local VictoryScreen = require "scenes.battlesystem.screens.victory"
local GameOverScreen = require "scenes.battlesystem.screens.gameover"
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
function BattleSystem:new(battleData)
BattleSystem.super.new(self)

View file

@ -1,6 +1,6 @@
local VictoryScreen = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local BATTLECOMPLETE_START = 2
local BATTLECOMPLETE_STOP = 4

View file

@ -1,6 +1,6 @@
local VictoryScreen = Object:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local BATTLECOMPLETE_START = 2
local BATTLECOMPLETE_STOP = 4

View file

@ -3,7 +3,7 @@ local World = Object:extend()
local maputils = require "scenes.battlesystem.utils"
local Map = require "game.modules.drawing.parallaxBackground"
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local POSITIONS = {
{x = 3, y = 4},

View file

@ -9,7 +9,7 @@ local itemutils = require "game.utils.items"
local gui = require "game.modules.gui"
local MenuBack = require "game.modules.gui.menuback"
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
function DebugMenu:new()
DebugMenu.super.new(self)

View file

@ -25,7 +25,7 @@ local Scene = require "birb.modules.scenes"
local TitleScreen = Scene:extend()
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 Menu = require "scenes.menus.titlescreen.menu"

View file

@ -1,7 +1,7 @@
local Parent = require "scenes.overworld.actors.parent"
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 Interactions = require "scenes.overworld.actors.player.interactions"
local Actions = require "scenes.overworld.actors.player.actions"

View file

@ -30,7 +30,7 @@ local CharsetManager = require "scenes.overworld.charsetmanager"
local screens = require "scenes.overworld.screens"
local gui = require "game.modules.gui"
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local EventManager = require "game.events"
local MessageQueue = require "game.modules.messagequeue"

View file

@ -1,7 +1,7 @@
local BaseScreen = require "scenes.overworld.screens.parent"
local GameOver = BaseScreen:extend()
local TweenManager = require "game.modules.tweenmanager"
local TweenManager = require "birb.classes.time"
local gui = require "game.modules.gui"