class GameLayer < Joybox::Core::Layer
  scene

  def on_enter
    Joybox::Core::SpriteFrameCache.frames.add file_name: "sprites.plist"
    @sprite_batch = Joybox::Core::SpriteBatch.new file_name: "sprites.png"
    self << @sprite_batch

    @sprite_batch << Sprite.new(frame_name: 'boy.png', position: [Screen.half_width, Screen.half_height])
    @sprite_batch << Sprite.new(frame_name: 'girl_cat.png', position: [0, 0])
    @sprite_batch << Sprite.new(frame_name: 'girl_cat.png', position: [Screen.width, Screen.height])
  end
end
class GameLayer < Joybox::Core::Layer
  scene

  def on_enter
    load_sprite_sheet
    @sprite_batch << Sprite.new(frame_name: 'boy.png', position: [Screen.half_width, Screen.half_height])
  end

  def load_sprite_sheet
    Joybox::Core::SpriteFrameCache.frames.add file_name: "sprites.plist"
    @sprite_batch = Joybox::Core::SpriteBatch.new file_name: "sprites.png"
    self << @sprite_batch
  end
end
Refactor load_sprite_sheet and remove bottom-left/top-right sprites.
Refactor load_sprite_sheet and remove bottom-left/top-right sprites.
