lib/fantasy/hud_image.rb in fantasy-0.1.0 vs lib/fantasy/hud_image.rb in fantasy-0.1.1
- old
+ new
@@ -2,11 +2,11 @@
include Draggable
attr_accessor :name, :scale, :color, :visible, :position, :layer
def initialize(position:, image_name: )
- @image = Gosu::Image.new("#{__dir__}/../images/#{image_name}.png", { retro: true })
+ @image = Image.new(image_name)
@name = image_name
@position = position
@scale = 1
@visible = true
@draggable_on_debug = true
@@ -28,10 +28,10 @@
drag if Global.debug
end
def draw
if visible
- @image.draw(@position.x, @position.y, 0, @scale, @scale)
+ @image.draw(x: @position.x, y: @position.y, scale: @scale)
end
draw_debug if Global.debug
end