
class Treefolk
 attr_reader :shape

  def initialize(window, shape)
   
    @image = Gosu::Image.new(window, "media/Treefolk.png", false)
    @shape = shape
    @shape.body.p = CP::Vec2.new(0.0, 0.0) # position
    @shape.body.v = CP::Vec2.new(0.0, 0.0) # velocity

    # Keep in mind that down the screen is positive y, which means that PI/2 radians,
    # which you might consider the top in the traditional Trig unit circle sense is actually
    # the bottom; thus 3PI/2 is the top
    @shape.body.a = (3*Math::PI/2.0) # angle in radians; faces towards top of screen
  end

  # Directly set the position of our Player
  def warp(vect)
    @shape.body.p = vect
  end

  def draw    
    @image.draw_rot(@shape.body.p.x, @shape.body.p.y, 0, @shape.body.a.radians_to_gosu)    
  end
end
