lib/fantasy/loop.rb in fantasy-0.1.3 vs lib/fantasy/loop.rb in fantasy-0.1.5
- old
+ new
@@ -36,17 +36,20 @@
Global.hud_images.each do |e|
e.move
end
+ Global.camera.move
+
Global.loop_proc.call() unless Global.loop_proc.nil?
end
def draw
Gosu.draw_rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Global.background)
(
Global.backgrounds +
+ Global.tile_maps +
Global.actors +
Global.hud_texts +
Global.hud_images
).sort_by(&:layer).each do |e|
e.draw