32 lines
718 B
Lua
32 lines
718 B
Lua
|
local Actor = require("scenes.battlesystem.entities.actor")
|
||
|
local Ennemy = Actor:extend()
|
||
|
|
||
|
function Ennemy:new(controller, x, y)
|
||
|
Ennemy.super.new(self, controller, x, y, 0)
|
||
|
self.isEnnemy = true
|
||
|
|
||
|
self.actionPerTurn = 2
|
||
|
end
|
||
|
|
||
|
function Ennemy:draw()
|
||
|
x, y = self.controller.battlearena:gridToPixel(self.x, self.y, true)
|
||
|
love.graphics.setColor(1, 0, 0, 1)
|
||
|
love.graphics.rectangle("fill", x - 8, y - 32, 16, 32)
|
||
|
love.graphics.setColor(1, 1, 1, 1)
|
||
|
end
|
||
|
|
||
|
function Ennemy:drawIcon(x, y)
|
||
|
love.graphics.setColor(1, 0, 0, 1)
|
||
|
love.graphics.rectangle("fill", x, y, 16, 16)
|
||
|
love.graphics.setColor(1, 1, 1, 1)
|
||
|
end
|
||
|
|
||
|
function Ennemy:getStats()
|
||
|
local stats = {}
|
||
|
stats.speed = 100
|
||
|
|
||
|
return stats
|
||
|
end
|
||
|
|
||
|
return Ennemy
|