ovellas/entidades/cercado.lua
2022-05-30 21:27:09 +02:00

19 lines
476 B
Lua

Cercado = {}
function Cercado:new(x, y)
self.sprite = love.graphics.newImage("img/cercado.png")
self.width = self.sprite:getWidth()
self.height = self.sprite:getHeight()
self.x = x-self.width/2
self.y = y-self.height/2
self.speed = 2
self.proba = love.graphics.newImage("img/valla-frente.png")
return self
end
function Cercado:draw()
love.graphics.draw(self.sprite, self.x, self.y)
love.graphics.draw(self.proba, self.x, self.y)
end