Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
cr-game
master
Game
Controller
Player
Built with Crystal 1.9.2
2023-10-07 20:42:06 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
]