Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.DisabledInput Class Reference

An Input that is always off/disabled. Returns 0/NONE to everything except AnyKey and PauseButton. More...

Inheritance diagram for PlatformerPro.DisabledInput:
PlatformerPro.Input PlatformerPro.PlatformerProMonoBehaviour

Public Member Functions

void Init (Input mainInput)
 
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. More...
 
override bool SetKey (KeyType type, KeyCode keyCode)
 Sets the keyboayrd key that corresponds to a Platform PRO input key. More...
 
override bool SetKey (KeyType type, KeyCode keyCode, int keyNumber)
 Sets the keyboayrd key that corresponds to a Platform PRO input key. More...
 
override KeyCode GetKeyForType (KeyType type, int keyNumber)
 Gets the key code for the given type. More...
 
override string GetAxisForType (KeyType type)
 Gets the name of the axis for the given key type. More...
 
override bool SaveInputData ()
 Saves the input data. More...
 
override bool LoadInputData (string dataName)
 Loads the input data for the given data name. More...
 
override void LoadInputData (StandardInputData data)
 Loads the provided input data. More...
 
- Public Member Functions inherited from PlatformerPro.Input
virtual void ConsumeJumpButton ()
 Consumes a jump button down event converting it in to a button held event. Does nothing if the button is in another state. More...
 
virtual void ConsumeRunButton ()
 Consumes a run button down event converting it in to a button held event. Does nothing if the button is in another state. More...
 
virtual void ConsumeActionButton (int index)
 Consumes an action button down event converting it in to a button held event. Does nothing if the button is in another state. More...
 
- Public Member Functions inherited from PlatformerPro.PlatformerProMonoBehaviour
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...
 

Properties

override float HorizontalAxis [get]
 
override int HorizontalAxisDigital [get]
 
override ButtonState HorizontalAxisState [get]
 
override float VerticalAxis [get]
 
override int VerticalAxisDigital [get]
 
override ButtonState VerticalAxisState [get]
 
override float AltHorizontalAxis [get]
 
override int AltHorizontalAxisDigital [get]
 
override ButtonState AltHorizontalAxisState [get]
 
override float AltVerticalAxis [get]
 
override int AltVerticalAxisDigital [get]
 
override ButtonState AltVerticalAxisState [get]
 
override ButtonState JumpButton [get]
 
override ButtonState RunButton [get]
 
override ButtonState PauseButton [get]
 
override ButtonState ActionButton [get]
 
override bool AnyKey [get]
 
- Properties inherited from PlatformerPro.Input
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...
 
- Properties inherited from PlatformerPro.PlatformerProMonoBehaviour
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...
 

Additional Inherited Members

- Public Attributes inherited from PlatformerPro.Input
int playerId
 The player who is assigned to this input. More...
 

Detailed Description

An Input that is always off/disabled. Returns 0/NONE to everything except AnyKey and PauseButton.

Member Function Documentation

◆ ForceButtonState()

override void PlatformerPro.DisabledInput.ForceButtonState ( int  index,
ButtonState  state 
)
virtual

Allow some external component to set button state (for current frame only).

Parameters
indexIndex.
stateState.

Implements PlatformerPro.Input.

◆ GetActionButtonState()

override ButtonState PlatformerPro.DisabledInput.GetActionButtonState ( int  buttonIndex)
virtual

Get the state of an action button.

Returns
The buttons state.
Parameters
buttonIndexThe index of the button.

Implements PlatformerPro.Input.

◆ GetAxisForType()

override string PlatformerPro.DisabledInput.GetAxisForType ( KeyType  type)
virtual

Gets the name of the axis for the given key type.

Returns
The axis name.
Parameters
typeType.

Implements PlatformerPro.Input.

◆ GetKeyForType()

override KeyCode PlatformerPro.DisabledInput.GetKeyForType ( KeyType  type,
int  keyNumber 
)
virtual

Gets the key code for the given type.

Returns
The mathcing KeyCode or keyCode.None if there is no match.
Parameters
typeKey type.
keyNumberKey number if this is an action key (ignored otherwise).

Implements PlatformerPro.Input.

◆ Init()

void PlatformerPro.DisabledInput.Init ( Input  mainInput)

◆ LoadInputData() [1/2]

override void PlatformerPro.DisabledInput.LoadInputData ( StandardInputData  data)
virtual

Loads the provided input data.

Parameters
dataData to load.

Implements PlatformerPro.Input.

◆ LoadInputData() [2/2]

override bool PlatformerPro.DisabledInput.LoadInputData ( string  dataName)
virtual

Loads the input data for the given data name.

Returns
true, if input data was loaded, false otherwise.
Parameters
dataNameData to load.

Implements PlatformerPro.Input.

◆ SaveInputData()

override bool PlatformerPro.DisabledInput.SaveInputData ( )
virtual

Saves the input data.

Returns
true, if input data was saved, false otherwise.

Implements PlatformerPro.Input.

◆ SetAxis()

override bool PlatformerPro.DisabledInput.SetAxis ( KeyType  type,
string  axis,
bool  reverseAxis 
)
virtual

Sets the joystick axis that corresponds to a Platform PRO input axis.

Returns
true, if key was set, false otherwise.
Parameters
typeType of key being set.
axisUnity axis name.
reverseAxisShould axis values be reversed.

Implements PlatformerPro.Input.

◆ SetKey() [1/2]

override bool PlatformerPro.DisabledInput.SetKey ( KeyType  type,
KeyCode  keyCode 
)
virtual

Sets the keyboayrd key that corresponds to a Platform PRO input key.

Returns
true, if key was set, false otherwise.
Parameters
typeType of key being set.
keyCodeUnity key code.

Implements PlatformerPro.Input.

◆ SetKey() [2/2]

override bool PlatformerPro.DisabledInput.SetKey ( KeyType  type,
KeyCode  keyCode,
int  keyNumber 
)
virtual

Sets the keyboayrd key that corresponds to a Platform PRO input key.

Returns
true, if key was set, false otherwise.
Parameters
typeType of key being set.
keyNumberThe action key number or ignored if not setting an action key

Implements PlatformerPro.Input.

Property Documentation

◆ ActionButton

override ButtonState PlatformerPro.DisabledInput.ActionButton
get

◆ AltHorizontalAxis

override float PlatformerPro.DisabledInput.AltHorizontalAxis
get

◆ AltHorizontalAxisDigital

override int PlatformerPro.DisabledInput.AltHorizontalAxisDigital
get

◆ AltHorizontalAxisState

override ButtonState PlatformerPro.DisabledInput.AltHorizontalAxisState
get

◆ AltVerticalAxis

override float PlatformerPro.DisabledInput.AltVerticalAxis
get

◆ AltVerticalAxisDigital

override int PlatformerPro.DisabledInput.AltVerticalAxisDigital
get

◆ AltVerticalAxisState

override ButtonState PlatformerPro.DisabledInput.AltVerticalAxisState
get

◆ AnyKey

override bool PlatformerPro.DisabledInput.AnyKey
get

◆ HorizontalAxis

override float PlatformerPro.DisabledInput.HorizontalAxis
get

◆ HorizontalAxisDigital

override int PlatformerPro.DisabledInput.HorizontalAxisDigital
get

◆ HorizontalAxisState

override ButtonState PlatformerPro.DisabledInput.HorizontalAxisState
get

◆ JumpButton

override ButtonState PlatformerPro.DisabledInput.JumpButton
get

◆ PauseButton

override ButtonState PlatformerPro.DisabledInput.PauseButton
get

◆ RunButton

override ButtonState PlatformerPro.DisabledInput.RunButton
get

◆ VerticalAxis

override float PlatformerPro.DisabledInput.VerticalAxis
get

◆ VerticalAxisDigital

override int PlatformerPro.DisabledInput.VerticalAxisDigital
get

◆ VerticalAxisState

override ButtonState PlatformerPro.DisabledInput.VerticalAxisState
get

The documentation for this class was generated from the following file: