Destination.lua 485 Bytes
Newer Older
Goerf's avatar
Goerf committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Destination = class('Destination')

function Destination:initialize(grid_x, grid_y)
  self.grid_x = grid_x
  self.grid_y = grid_y
  self.x = self.grid_x*grid_ppNo
  self.y = self.grid_y*grid_ppNo
  self.width = grid_ppNo
  self.height = grid_ppNo
  table.insert(list_destination, self)
end

function Destination:draw()
  love.graphics.setColor(0.1,0.1,0.8)
  love.graphics.rectangle("fill", self.grid_x*grid_ppNo, self.grid_y*grid_ppNo, self.width, self.height)
end

return Destination