From 7d182bd3a1f0cfa4c5af223ce36011af10d3ff09 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Wed, 14 Aug 2019 20:11:35 +0200 Subject: [PATCH] chore(cbs): refactor parent a bit --- .../scenes/battlesystem/actors/parent.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/actors/parent.lua b/sonic-radiance.love/scenes/battlesystem/actors/parent.lua index 0dd73bd..89c937f 100644 --- a/sonic-radiance.love/scenes/battlesystem/actors/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/actors/parent.lua @@ -2,6 +2,9 @@ local Parent = Object:extend() -- On créer la classe des entitées, c'est la cl local maputils = require "scenes.battlesystem.utils" +-- INIT FUNCTION +-- Initilize the actor + function Parent:new(world, x, y, z) self.depth = 0 self.x = x @@ -28,6 +31,13 @@ function Parent:register() self.world:registerActor(self) end +function Parent:update(dt) + -- lol +end + +-- SPRITE FUNCTIONS +-- Handle the character sprite + function Parent:setSprite(name, ox, oy, active) self.sprite = {} @@ -50,9 +60,8 @@ function Parent:drawSprite(tx, ty) end end -function Parent:update(dt) - -- lol -end +-- DRAW FUNCTIONS +-- Handle draw functions function Parent:draw()