local entity = {}

entity.__index = entity

function entity.load(actor)
  local self = setmetatable({}, entity)
  self.data = {
    actor = actor,

    increase_max_speed = 1,
    increase_accel = 1
  }
  return self
end

function entity:update(dt)

end

function entity:draw()
  love.graphics.push()
  love.graphics.print(string.format("[(a)-Max Speed+(d)] : %s", self.data.increase_max_speed), 0, 40)
  love.graphics.print(string.format("[(q)-Accel+(e)] : %s", self.data.increase_accel), 0, 60)
  love.graphics.pop()
  self.data.actor:draw()
end

function entity:keyreleased(key, scancode)
  if (key == "a") then
    self.data.actor.data.max_speed = self.data.actor.data.max_speed - self.data.increase_max_speed
  elseif (key == "d") then
    self.data.actor.data.max_speed = self.data.actor.data.max_speed + self.data.increase_max_speed
  elseif (key == "q") then
    self.data.actor.data.accel = self.data.actor.data.accel - self.data.increase_accel
  elseif (key == "e") then
    self.data.actor.data.accel = self.data.actor.data.accel + self.data.increase_accel
  end
end


return entity
