Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
cr-game
master
Game
Controller
Player
Generated using Crystal 1.14.0
2025-03-21 13:55:21 UTC
class
Game::
Controller
Game::Controller
Reference
Object
Overview
Handle button to action mapping in a dynamic way
Defined in:
game/controller.cr
Constructors
.new
(mapping : Hash(SF::Keyboard::Key, String))
Instance Method Summary
#action?
(name)
#press
(button)
#registered?
(button)
#release
(button)
Constructor Detail
def self.
new
(mapping : Hash(SF::Keyboard::Key, String))
#
[
View source
]
Instance Method Detail
def
action?
(name)
#
[
View source
]
def
press
(button)
#
[
View source
]
def
registered?
(button)
#
[
View source
]
def
release
(button)
#
[
View source
]