Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 378ef9266e
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (24 sloc) 0.505 kb
class Hundred_Ball
attr_accessor :x, :y
def initialize(game_window)
@game_window = game_window
@icon = Gosu::Image.new(@game_window, "img/hundred_ball.png", true)
@rotation = 0
@get_sound = Gosu::Sample.new(@game_window, "sound/get.wav")
reset
end
def update
if @y > @game_window.height
reset
else
@y = @y + 2
end
end
def draw
@icon.draw_rot(@x,@y,3,0,0.5,0.5)
end
def reset
@y = 0
@x = rand(@game_window.width)
end
end
Jump to Line
Something went wrong with that request. Please try again.