sonic-radiance/sonic-radiance.love/scenes/overworld/actors/parent.lua
2021-03-20 16:35:38 +01:00

21 lines
547 B
Lua

local Base = require "core.modules.world.actors.actor2D"
local Parent = Base:extend()
function Parent:new(world, type, x, y, w, h, isSolid)
self.scene = world.scene
Parent.super.new(self, world, type, x, y, w, h, isSolid)
self.charDir = "down"
self.charset = self.world.scene.charsetManager
end
function Parent:update(dt)
self.depth = -self.y
Parent.super.update(self, dt)
self.depth = -self.y
end
function Parent:draw()
love.graphics.rectangle("fill", math.floor(self.x), math.floor(self.y), self.w, self.h)
end
return Parent