Class: Phaser::Key
- Inherits:
-
Object
- Object
- Phaser::Key
- Includes:
- Native
- Defined in:
- lib/opal/phaser/input/key.rb
Instance Method Summary collapse
Instance Method Details
#on(type, &block) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/opal/phaser/input/key.rb', line 5 def on(type, &block) case type.to_sym when :down `#@native.onDown.add(#{block.to_n})` when :up `#@native.onUp.add(#{block.to_n})` end end |