switched to input querying
This commit is contained in:
parent
13c714178c
commit
62edcd43c8
|
@ -26,6 +26,9 @@ class GameWindow < Gosu::Window
|
||||||
|
|
||||||
# Called every tick by gosu to update object positions
|
# Called every tick by gosu to update object positions
|
||||||
def update
|
def update
|
||||||
|
if self.button_down?(Gosu::MsLeft) then
|
||||||
|
@emitter.spawn(self.mouse_x, self.mouse_y)
|
||||||
|
end
|
||||||
@emitter.update
|
@emitter.update
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -38,9 +41,6 @@ class GameWindow < Gosu::Window
|
||||||
# Quit on ESC
|
# Quit on ESC
|
||||||
def button_down(id)
|
def button_down(id)
|
||||||
close if id == Gosu::Button::KbEscape
|
close if id == Gosu::Button::KbEscape
|
||||||
if id == Gosu::MsLeft then
|
|
||||||
@emitter.spawn(self.mouse_x, self.mouse_y)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def needs_cursor?; true; end
|
def needs_cursor?; true; end
|
||||||
|
|
Reference in a new issue