Class enchant.BinaryInputManager
Class for managing input.
- Defined in: enchant.js
- Extends enchant.InputManager
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.BinaryInputManager(flagStore, activeEventNameSuffix, inactiveEventNameSuffix, source)
|
Field Attributes | Field Name and Description |
---|---|
event name suffix that dispatched by BinaryInputManager.
|
|
The number of active inputs.
|
|
event name suffix that dispatched by BinaryInputManager.
|
- Fields borrowed from class enchant.InputManager:
- broadcastTarget, source, valueStore
Method Summary
Method Attributes | Method Name and Description |
---|---|
bind(inputSource, name)
Name specified input.
|
|
changeState(name, bool)
Change state of input.
|
|
unbind(inputSource)
Remove binded name.
|
- Methods borrowed from class enchant.InputManager:
- addBroadcastTarget
- broadcastEvent
- removeBroadcastTarget
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.BinaryInputManager(flagStore, activeEventNameSuffix, inactiveEventNameSuffix, source)
- Parameters:
- {*} flagStore
- object that store input flag.
- {String} activeEventNameSuffix
- event name suffix.
- {String} inactiveEventNameSuffix
- event name suffix.
- {*} source Optional, Default: this
- source that will be added to event object.
Field Detail
{String}
activeEventNameSuffix
event name suffix that dispatched by BinaryInputManager.
{Number}
activeInputsNum
The number of active inputs.
{String}
inactiveEventNameSuffix
event name suffix that dispatched by BinaryInputManager.
Method Detail
-
bind(inputSource, name)Name specified input.
- Parameters:
- {enchant.BinaryInputSource} inputSource
- input source.
- {String} name
- input name.
-
changeState(name, bool)Change state of input.
- Parameters:
- {String} name
- input name.
- {Boolean} bool
- input state.
-
unbind(inputSource)Remove binded name.
- Parameters:
- {enchant.BinaryInputSource} inputSource
- input source.