draw_rot
with the wrong arguments in ball.rb
, I think you should pass 0.5 to center_x and center_y. This would draw the ball with the center of the graphic over its @x/@y.Player
so that it also draws its @icon
with its center over @x/@y.def move_right
if @x > 800
@x = 800
else
@x = [@x + 10, 0].max
end
end
def move_right
@x = [@x + 10, 0].max
@x = 800 if @x > 800
end
def move_left
@x = @x - 10
@x = 0 if @x < 0
end
def move_right
@x = @x + 10
@x = 800 if @x > 800
end
def move_right
@x = [@x + 10,800].min
end
def move_right
@x = [@x + 10, @level.right_side].min
end
def move_left
@x = [@x - 10, @level.left_side].max
end
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill