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

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

Loading…
Cancel
Save