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

@ -68,16 +68,18 @@ class Window < Gosu::Window
# end
def update
@physobjs.each do |obj|
obj.physics
end
@planets.each do |planet|
orbiters = []
orbiters += @physobjs
orbiters += @planets
orbiters.delete(planet)
planet.orbit(planets)
if( !@freeze ) then
@physobjs.each do |obj|
obj.physics
end
@planets.each do |planet|
orbiters = []
orbiters += @physobjs
orbiters += @planets
orbiters.delete(planet)
planet.orbit(planets)
end
end
end

Loading…
Cancel
Save