ovellas/entidades/cercado.lua

19 lines
476 B
Lua
Raw Normal View History

2022-05-30 20:34:58 +02:00
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
2022-05-30 21:27:09 +02:00
self.proba = love.graphics.newImage("img/valla-frente.png")
2022-05-30 20:34:58 +02:00
return self
end
function Cercado:draw()
love.graphics.draw(self.sprite, self.x, self.y)
2022-05-30 21:27:09 +02:00
love.graphics.draw(self.proba, self.x, self.y)
2022-05-30 20:34:58 +02:00
end