pull/1/head
E. Almqvist 4 years ago
parent 184cce417c
commit 20e3aec04e
  1. 2
      app.rb

@ -68,6 +68,7 @@ class Window < Gosu::Window
# end # end
def update def update
if( !@freeze ) then
@physobjs.each do |obj| @physobjs.each do |obj|
obj.physics obj.physics
end end
@ -80,6 +81,7 @@ class Window < Gosu::Window
planet.orbit(planets) planet.orbit(planets)
end end
end end
end
private def generate_debug_string(obj) private def generate_debug_string(obj)
return "\n#{obj.name}\nVel: #{obj.vel.round(4)} (#{obj.vel.magnitude.round(1)})\nAccel: #{obj.accel.round(4)} (#{obj.accel.magnitude.round(4)})\nPos: #{obj.pos.round(4)}\n" return "\n#{obj.name}\nVel: #{obj.vel.round(4)} (#{obj.vel.magnitude.round(1)})\nAccel: #{obj.accel.round(4)} (#{obj.accel.magnitude.round(4)})\nPos: #{obj.pos.round(4)}\n"

Loading…
Cancel
Save