require 'eventmachine'
require 'gosu'
class Window < Gosu::Window
def initialize
super(640, 480)
end
def update
0 / 0 # Generate error.
end
end
$window = Window.new
EM.run do
EM.add_periodic_timer(1 / 60.0) { $window.tick }
end
require 'eventmachine'
require 'gosu'
class Window < Gosu::Window
def initialize
super(640, 480)
end
def update
begin
0 / 0 # Generate error.
rescue => e
p e
self.close
EM.stop
end
end
end
$window = Window.new
EM.run do
EM.add_periodic_timer(1 / 60.0) { $window.tick }
end
EM.add_periodic_timer(1 / 60.0) { $window.tick unless $window.closed? }
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill