ovellas/entidades/cercado.lua
2022-05-30 20:34:58 +02:00

17 lines
361 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
return self
end
function Cercado:draw()
love.graphics.draw(self.sprite, self.x, self.y)
end