Old key sys

keyevents
E. Almqvist 3 years ago
parent fd61000677
commit 388ad92bb4
  1. 22
      src/app.rb

@ -94,9 +94,11 @@ class Window < Gosu::Window
@up_keyhook.call(KEY_EVENTS[id]) @up_keyhook.call(KEY_EVENTS[id])
@key_events[:down].delete(id) # when the key is released: stop holding it @key_events[:down].delete(id) # when the key is released: stop holding it
# if( @world && @world.controller ) then =begin
# @world.controller.button_up(id) if( @world && @world.controller ) then
# end @world.controller.button_up(id)
end
=end
end end
def button_down(id) def button_down(id)
@ -106,13 +108,13 @@ class Window < Gosu::Window
@key_events[:down] << id @key_events[:down] << id
# if( id == BIND_PAUSE ) then if( id == BIND_PAUSE ) then
# @freeze = !@freeze @freeze = !@freeze
# end end
#
# if( @world && @world.controller ) then if( @world && @world.controller ) then
# @world.controller.button_down(id) @world.controller.button_down(id)
# end end
end end
private def broadcast_event(event) private def broadcast_event(event)

Loading…
Cancel
Save