@ -31,10 +31,11 @@ end
window = Window.new("Physics!", 1600, 900)
planet = PhysCube.new(window, 16, 16, 0xff_aaffaa)
planet.pos = Vector[800, 450]
cube = PhysCube.new(window, 8, 8)
cube.accel = Vector[0, 0.1]
cube.vel = Vector[2, -2]
cube.vel = Vector[2, 0]
window.physobjs << planet
window.physobjs << cube
window.show
@ -37,7 +37,7 @@ class PhysCube < PhysObj
def render
x, y = self.pos[0], self.pos[1]
Gosu.draw_quad(x, y, @color, x + self.width, y, @color, x, y + self.height, @color, x + self.width, y + self.height, @color)
self.draw_vector(@vel, 2)
# self.draw_vector(@vel, 2)
end
def physics