![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Input which accepts input form multiple sources and provides an interface that makes them look like one source. More...
Public Member Functions | |
override ButtonState | GetActionButtonState (int buttonIndex) |
Get the state of an action button. More... | |
override void | ForceButtonState (int index, ButtonState state) |
Allow some external component to set button state (for current frame only). More... | |
override bool | SetAxis (KeyType type, string axis, bool reverseAxis) |
Sets the joystick axis that corresponds to a Platform PRO input axis. NOT AVAILABLE in MultiInput. More... | |
override bool | SetKey (KeyType type, KeyCode keyCode) |
Sets the keyboayrd key that corresponds to a Platform PRO input key. NOT AVAILABLE in MultiInput. More... | |
override bool | SetKey (KeyType type, KeyCode keyCode, int keyNumber) |
Sets the keyboayrd key that corresponds to a Platform PRO input key. NOT AVAILABLE in MultiInput. More... | |
override KeyCode | GetKeyForType (KeyType type, int keyNumber) |
Gets the key code for the given type. NOT AVAILABLE in MultiInput. More... | |
override string | GetAxisForType (KeyType type) |
Gets the name of the axis for the given key type. NOT AVAILABLE in MultiInput. More... | |
override bool | SaveInputData () |
Saves the input data. NOT AVAILABLE in MultiInput. More... | |
override bool | LoadInputData (string dataName) |
Loads the input data for the given data name. NOT AVAILABLE in MultiInput. More... | |
override void | LoadInputData (StandardInputData data) |
Loads the input data for the given data name. NOT AVAILABLE in MultiInput. More... | |
override void | ConsumeJumpButton () |
Consumes a jump button down event converting it in to a button held event. More... | |
override void | ConsumeRunButton () |
Consumes a run button down event converting it in to a button held event. More... | |
override void | ConsumeActionButton (int index) |
Consumes an action button down event converting it in to a button held event. More... | |
![]() | |
virtual void | Validate (PlatformerProMonoBehaviour myTarget) |
Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More... | |
Public Attributes | |
Input[] | inputs |
An ordered list of inputs. Highest in the list is given priority. More... | |
![]() | |
int | playerId |
The player who is assigned to this input. More... | |
Properties | |
override float | HorizontalAxis [get] |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours. More... | |
override int | HorizontalAxisDigital [get] |
A "digital" version of the horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT. More... | |
override ButtonState | HorizontalAxisState [get] |
Gets the state of the horizontal axis. More... | |
override float | VerticalAxis [get] |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours. More... | |
override int | VerticalAxisDigital [get] |
A "digital" version of the alternate vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP. More... | |
override ButtonState | VerticalAxisState [get] |
Gets the state of the vertical axis. More... | |
override float | AltHorizontalAxis [get] |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours. More... | |
override int | AltHorizontalAxisDigital [get] |
A "digital" version of the alternate horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT. More... | |
override ButtonState | AltHorizontalAxisState [get] |
Gets the state of the alternate horizontal axis. More... | |
override float | AltVerticalAxis [get] |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours. More... | |
override int | AltVerticalAxisDigital [get] |
A "digital" version of the vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP. More... | |
override ButtonState | AltVerticalAxisState [get] |
Gets the state of the alternate vertical axis. More... | |
override ButtonState | JumpButton [get] |
State of the jump button. More... | |
override ButtonState | RunButton [get] |
State of the run button. More... | |
override ButtonState | PauseButton [get] |
State of the pause button. More... | |
override ButtonState | ActionButton [get] |
Gets the action button. More... | |
override bool | AnyKey [get] |
Returns true if any button or action key is being pressed. More... | |
![]() | |
abstract float | HorizontalAxis [get] |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours. More... | |
abstract int | HorizontalAxisDigital [get] |
A "digital" version of the horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT. More... | |
abstract ButtonState | HorizontalAxisState [get] |
Return ButtonState.DOWN if the axis state went from <= 0 to 1 or >= 0 to -1. Return ButtonState.HELD if the axis stayed at the same value. Return ButtonState.UP if the axis state went from != 0 to 0. More... | |
abstract float | VerticalAxis [get] |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours. More... | |
abstract int | VerticalAxisDigital [get] |
A "digital" version of the alternate vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP. More... | |
abstract ButtonState | VerticalAxisState [get] |
Return ButtonState.DOWN if the axis state went from <= 0 to 1 or >= 0 to -1. Return ButtonState.HELD if the axis stayed at the same value. Return ButtonState.UP if the axis state went from != 0 to 0. More... | |
abstract float | AltHorizontalAxis [get] |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours. More... | |
abstract int | AltHorizontalAxisDigital [get] |
A "digital" version of the alternate horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT. More... | |
abstract ButtonState | AltHorizontalAxisState [get] |
Return ButtonState.DOWN if the axis state went from <= 0 to 1 or >= 0 to -1. Return ButtonState.HELD if the axis stayed at the same value. Return ButtonState.UP if the axis state went from != 0 to 0. More... | |
abstract float | AltVerticalAxis [get] |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours. More... | |
abstract int | AltVerticalAxisDigital [get] |
A "digital" version of the vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP. More... | |
abstract ButtonState | AltVerticalAxisState [get] |
Return ButtonState.DOWN if the axis state went from <= 0 to 1 or >= 0 to -1. Return ButtonState.HELD if the axis stayed at the same value. Return ButtonState.UP if the axis state went from != 0 to 0. More... | |
abstract ButtonState | JumpButton [get] |
State of the jump button. More... | |
abstract ButtonState | RunButton [get] |
State of the run button. More... | |
abstract ButtonState | PauseButton [get] |
State of the pause button. More... | |
abstract ButtonState | ActionButton [get] |
State of the default action button. This could be pickup, attack, etc. If you need more buttons use the additional action use Input.GetActionButtonState() More... | |
abstract bool | AnyKey [get] |
Returns true if any button or action key is being pressed. More... | |
![]() | |
virtual string | Header [get] |
Gets the header string used to describe the component. More... | |
virtual string | DocLink [get] |
Gets a link to documentation site. More... | |
virtual string | VideoLink [get] |
Gets a link to a youtube video. More... | |
virtual string | Deprecated [get] |
If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More... | |
Input which accepts input form multiple sources and provides an interface that makes them look like one source.
|
virtual |
Consumes an action button down event converting it in to a button held event.
Reimplemented from PlatformerPro.Input.
|
virtual |
Consumes a jump button down event converting it in to a button held event.
Reimplemented from PlatformerPro.Input.
|
virtual |
Consumes a run button down event converting it in to a button held event.
Reimplemented from PlatformerPro.Input.
|
virtual |
Allow some external component to set button state (for current frame only).
index | Index. |
state | State. |
Implements PlatformerPro.Input.
|
virtual |
Get the state of an action button.
buttonIndex | The index of the button. |
Implements PlatformerPro.Input.
|
virtual |
Gets the name of the axis for the given key type. NOT AVAILABLE in MultiInput.
type | Type. |
Implements PlatformerPro.Input.
|
virtual |
Gets the key code for the given type. NOT AVAILABLE in MultiInput.
type | Key type. |
keyNumber | Key number if this is an action key (ignored otherwise). |
Implements PlatformerPro.Input.
|
virtual |
Loads the input data for the given data name. NOT AVAILABLE in MultiInput.
false
dataName | Data to load. |
data | Data. |
Implements PlatformerPro.Input.
|
virtual |
Loads the input data for the given data name. NOT AVAILABLE in MultiInput.
false
dataName | Data to load. |
Implements PlatformerPro.Input.
|
virtual |
Saves the input data. NOT AVAILABLE in MultiInput.
false
Implements PlatformerPro.Input.
|
virtual |
Sets the joystick axis that corresponds to a Platform PRO input axis. NOT AVAILABLE in MultiInput.
false
type | Type of key being set. |
axis | Unity axis name. |
reverseAxis | Should axis values be reversed. |
Implements PlatformerPro.Input.
|
virtual |
Sets the keyboayrd key that corresponds to a Platform PRO input key. NOT AVAILABLE in MultiInput.
false
type | Type of key being set. |
keyCode | Unity key code. |
Implements PlatformerPro.Input.
|
virtual |
Sets the keyboayrd key that corresponds to a Platform PRO input key. NOT AVAILABLE in MultiInput.
false
type | Type of key being set. |
keyNumber | The action key number or ignored if not setting an action key |
keyCode | Key code. |
Implements PlatformerPro.Input.
Input [] PlatformerPro.MultiInput.inputs |
An ordered list of inputs. Highest in the list is given priority.
|
get |
Gets the action button.
The action button.
|
get |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours.
The alternate horizontal axis.
|
get |
A "digital" version of the alternate horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT.
The alternate horizontal axis digital.
|
get |
Gets the state of the alternate horizontal axis.
The state of the alternate horizontal axis.
|
get |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours.
The alternate vertical axis.
|
get |
A "digital" version of the vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP.
The alternate vertical axis digital.
|
get |
Gets the state of the alternate vertical axis.
The state of the alternate vertical axis.
|
get |
Returns true if any button or action key is being pressed.
true
false
|
get |
A float value clamped between -1 for completely left and 1 for compeletely right. 0.5f would mean "half right". The exact interpretation of the values is up to the movement behaviours.
The horizontal axis.
|
get |
A "digital" version of the horizontal axis in which the only valid values are -1 for LEFT, 0 for NONE, and 1 for RIGHT.
The horizontal axis digital.
|
get |
Gets the state of the horizontal axis.
The state of the horizontal axis.
|
get |
State of the jump button.
The jump button.
|
get |
State of the pause button.
The pause button.
|
get |
State of the run button.
The run button.
|
get |
A float value clamped between -1 for completely DOWN and 1 for completely UP. 0.5f would mean "half up". The exact interpretation of the values is up to the movement behaviours.
The vertical axis.
|
get |
A "digital" version of the alternate vertical axis in which the only valid values are -1 for DOWN, 0 for NONE, and 1 for UP.
The vertical axis digital.
|
get |
Gets the state of the vertical axis.
The state of the vertical axis.