switched to input querying

This commit is contained in:
Alexander Yakovlev 2012-12-21 20:13:06 +07:00
parent 13c714178c
commit 62edcd43c8

View file

@ -26,6 +26,9 @@ class GameWindow < Gosu::Window
# Called every tick by gosu to update object positions
def update
if self.button_down?(Gosu::MsLeft) then
@emitter.spawn(self.mouse_x, self.mouse_y)
end
@emitter.update
end
@ -38,9 +41,6 @@ class GameWindow < Gosu::Window
# Quit on ESC
def button_down(id)
close if id == Gosu::Button::KbEscape
if id == Gosu::MsLeft then
@emitter.spawn(self.mouse_x, self.mouse_y)
end
end
def needs_cursor?; true; end