Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (18 sloc) 432 Bytes
require 'gosu'
require './ball.rb'
class MovementExample < Gosu::Window
def initialize
super 640, 480
self.caption = "Movement Example"
img = Gosu::Image.new("./ball.png")
@ball = Ball.new(img, self.width/2, self.height/2, 0)
end
def draw
@ball.draw
end
def update
timeElapsed = self.update_interval / 1000 #Elapsed time in seconds
@ball.update(self, timeElapsed)
end
end
window = MovementExample.new.show