sonic-radiance/sonic-radiance.love/scenes/battlesystem/actors/ennemy.lua

30 lines
631 B
Lua
Raw Normal View History

local Battler = require("scenes.battlesystem.actors.battler")
local Ennemy = Battler:extend()
2019-08-14 22:47:10 +02:00
local gui = require "game.modules.gui"
function Ennemy:new(world, x, y, owner)
Ennemy.super.new(self, world, x, y, 0, owner)
self.isEnnemy = true
self.actionPerTurn = 2
end
function Ennemy:draw()
Ennemy.super.draw(self)
local x, y = self.world.map:gridToPixel(self.x, self.y, true)
2019-08-14 22:47:10 +02:00
2020-08-04 19:53:11 +02:00
self.owner:drawHUD(x - 12, y - 38)
2020-07-19 21:41:14 +02:00
if (self.isSelected) then
local height = 32
self.assets.images["cursorpeak"]:draw(x - 7, y - 24 - 32)
end
end
function Ennemy:getStats()
return self.data.stats
end
return Ennemy