local Emblem = Object:extend()

function Emblem:new(abstract, scene)
  self.assets = scene.assets
  self.abstract = abstract

  self.charid = self.abstract.simplename
  self.stats = self.abstract:getStats()
end

function Emblem:draw(x, y)
  self:drawBackground(x, y)
  self:drawForeground(x, y)
end

function Emblem:drawForeground(x, y)
  local emblem2 = "m_" .. self.abstract.data.class
  core.screen:setScissor(x, y-16, 32, 40)
  self.assets.sprites[self.charid]:drawAnimation(x+14, y+14)
  core.screen:resetScissor( )
  self.assets.images[emblem2]:draw(x, y)
end

function Emblem:drawBackground(x, y)
  local emblem1 = "e_" .. self.abstract.data.class

  self.assets.images[emblem1]:draw(x, y)

end


return Emblem
