Corgi Engine  v8.8
MoreMountains.CorgiEngine.InputManager Class Reference

This persistent singleton handles the inputs and sends commands to the player. IMPORTANT : this script's Execution Order MUST be -100. You can define a script's execution order by clicking on the script's file and then clicking on the Execution Order button at the bottom right of the script's inspector. See https://docs.unity3d.com/Manual/class-ScriptExecution.html for more details More...

Inheritance diagram for MoreMountains.CorgiEngine.InputManager:
MoreMountains.Tools.MMSingleton< InputManager > MoreMountains.CorgiEngine.InputSystemManager MoreMountains.CorgiEngine.InputSystemManagerEventsBased

Public Types

enum  InputForcedMode { InputForcedMode.None, InputForcedMode.Mobile, InputForcedMode.Desktop }
 the possible modes for this input manager More...
 
enum  MovementControls { MovementControls.Joystick, MovementControls.Arrows }
 the possible kinds of control used for movement More...
 

Public Member Functions

virtual void ControlsModeDetection ()
 Turns mobile controls on or off depending on what's been defined in the inspector, and what target device we're on More...
 
virtual void ProcessButtonStates ()
 Called at LateUpdate(), this method processes the button states of all registered buttons More...
 
virtual void SetMovement ()
 Called every frame, if not on mobile, gets primary movement values from input More...
 
virtual void SetSecondaryMovement ()
 Called every frame, if not on mobile, gets secondary movement values from input More...
 
virtual void SetMovement (Vector2 movement)
 If you're using a touch joystick, bind your main joystick to this method More...
 
virtual void SetSecondaryMovement (Vector2 movement)
 If you're using a touch joystick, bind your secondary joystick to this method More...
 
virtual void SetHorizontalMovement (float horizontalInput)
 If you're using touch arrows, bind your left/right arrows to this method More...
 
virtual void SetVerticalMovement (float verticalInput)
 If you're using touch arrows, bind your secondary down/up arrows to this method More...
 
virtual void SetSecondaryHorizontalMovement (float horizontalInput)
 If you're using touch arrows, bind your secondary left/right arrows to this method More...
 
virtual void SetSecondaryVerticalMovement (float verticalInput)
 If you're using touch arrows, bind your down/up arrows to this method More...
 
virtual void ForceAllButtonStatesTo (MMInput.ButtonStates newState)
 Lets you force the state of all buttons in the InputManager to the one specified in parameters More...
 
virtual void JumpButtonDown ()
 
virtual void JumpButtonPressed ()
 
virtual void JumpButtonUp ()
 
virtual void SwimButtonDown ()
 
virtual void SwimButtonPressed ()
 
virtual void SwimButtonUp ()
 
virtual void GlideButtonDown ()
 
virtual void GlideButtonPressed ()
 
virtual void GlideButtonUp ()
 
virtual void InteractButtonDown ()
 
virtual void InteractButtonPressed ()
 
virtual void InteractButtonUp ()
 
virtual void DashButtonDown ()
 
virtual void DashButtonPressed ()
 
virtual void DashButtonUp ()
 
virtual void RollButtonDown ()
 
virtual void RollButtonPressed ()
 
virtual void RollButtonUp ()
 
virtual void FlyButtonDown ()
 
virtual void FlyButtonPressed ()
 
virtual void FlyButtonUp ()
 
virtual void RunButtonDown ()
 
virtual void RunButtonPressed ()
 
virtual void RunButtonUp ()
 
virtual void JetpackButtonDown ()
 
virtual void JetpackButtonPressed ()
 
virtual void JetpackButtonUp ()
 
virtual void ReloadButtonDown ()
 
virtual void ReloadButtonPressed ()
 
virtual void ReloadButtonUp ()
 
virtual void PushButtonDown ()
 
virtual void PushButtonPressed ()
 
virtual void PushButtonUp ()
 
virtual void ShootButtonDown ()
 
virtual void ShootButtonPressed ()
 
virtual void ShootButtonUp ()
 
virtual void GripButtonDown ()
 
virtual void GripButtonPressed ()
 
virtual void GripButtonUp ()
 
virtual void SecondaryShootButtonDown ()
 
virtual void SecondaryShootButtonPressed ()
 
virtual void SecondaryShootButtonUp ()
 
virtual void PauseButtonDown ()
 
virtual void PauseButtonPressed ()
 
virtual void PauseButtonUp ()
 
virtual void RestartButtonDown ()
 
virtual void RestartButtonPressed ()
 
virtual void RestartButtonUp ()
 
virtual void SwitchWeaponButtonDown ()
 
virtual void SwitchWeaponButtonPressed ()
 
virtual void SwitchWeaponButtonUp ()
 
virtual void SwitchCharacterButtonDown ()
 
virtual void SwitchCharacterButtonPressed ()
 
virtual void SwitchCharacterButtonUp ()
 
virtual void TimeControlButtonDown ()
 
virtual void TimeControlButtonPressed ()
 
virtual void TimeControlButtonUp ()
 
virtual void GrabButtonDown ()
 
virtual void GrabButtonPressed ()
 
virtual void GrabButtonUp ()
 
virtual void ThrowButtonDown ()
 
virtual void ThrowButtonPressed ()
 
virtual void ThrowButtonUp ()
 

Public Attributes

bool InputDetectionActive = true
 set this to false to prevent input to be detected More...
 
bool ResetButtonStatesOnFocusLoss = true
 if this is true, button states will be reset on focus loss - when clicking outside the player window on PC, for example More...
 
string PlayerID = "Player1"
 a string identifying the target player(s). You'll need to set this exact same string on your Character, and set its type to Player More...
 
bool AutoMobileDetection = true
 if this is set to true, the InputManager will try to detect what mode it should be in, based on the current target device More...
 
InputForcedMode ForcedMode
 use this to force desktop (keyboard, pad) or mobile (touch) mode More...
 
bool HideMobileControlsInEditor = false
 if this is true, mobile controls will be hidden in editor mode, regardless of the current build target or the forced mode More...
 
MovementControls MovementControl = MovementControls.Joystick
 use this to specify whether you want to use the default joystick or arrows to move your character More...
 
bool DelayedButtonPresses = false
 if this is true, button state changes are offset by one frame (usually useful on Android) More...
 
bool SmoothMovement =true
 If set to true, acceleration / deceleration will take place when moving / stopping. More...
 
Vector2 Threshold = new Vector2(0.1f, 0.4f)
 the minimum horizontal and vertical value you need to reach to trigger movement on an analog controller (joystick for example) More...
 

Protected Member Functions

virtual void Start ()
 On Start we look for what mode to use, and initialize our axis and buttons More...
 
virtual void Initialization ()
 
virtual void InitializeButtons ()
 Initializes the buttons. If you want to add more buttons, make sure to register them here. More...
 
virtual void InitializeAxis ()
 Initializes the axis strings. More...
 
virtual void LateUpdate ()
 On LateUpdate, we process our button states More...
 
virtual void Update ()
 At update, we check the various commands and update our values and states accordingly. More...
 
virtual void GetInputButtons ()
 If we're not on mobile, watches for input changes, and updates our buttons states accordingly More...
 
virtual void SetShootAxis ()
 Called every frame, if not on mobile, gets shoot axis values from input More...
 
virtual void OnApplicationFocus (bool hasFocus)
 If we lose focus, we reset the states of all buttons More...
 
- Protected Member Functions inherited from MoreMountains.Tools.MMSingleton< InputManager >
virtual void Awake ()
 On awake, we initialize our instance. Make sure to call base.Awake() in override if you need awake. More...
 
virtual void InitializeSingleton ()
 Initializes the singleton. More...
 

Static Protected Member Functions

static void InitializeStatics ()
 Statics initialization to support enter play modes More...
 

Protected Attributes

List< MMInput.IMButtonButtonList
 
Vector2 _primaryMovement = Vector2.zero
 
Vector2 _secondaryMovement = Vector2.zero
 
string _axisHorizontal
 
string _axisVertical
 
string _axisSecondaryHorizontal
 
string _axisSecondaryVertical
 
string _axisShoot
 
string _axisShootSecondary
 

Properties

bool IsMobile [get, protected set]
 if this is true, we're currently in mobile mode More...
 
MMInput.IMButton JumpButton [get, protected set]
 the jump button, used for jumps More...
 
MMInput.IMButton SwimButton [get, protected set]
 the swim button, used to swim More...
 
MMInput.IMButton GlideButton [get, protected set]
 the glide button, used to glide in the air More...
 
MMInput.IMButton InteractButton [get, protected set]
 the activate button, used for interactions with zones More...
 
MMInput.IMButton JetpackButton [get, protected set]
 the jetpack button More...
 
MMInput.IMButton FlyButton [get, protected set]
 the fly button More...
 
MMInput.IMButton RunButton [get, protected set]
 the run button More...
 
MMInput.IMButton DashButton [get, protected set]
 the dash button More...
 
MMInput.IMButton RollButton [get, protected set]
 the roll button More...
 
MMInput.IMButton GrabButton [get, protected set]
 the dash button More...
 
MMInput.IMButton ThrowButton [get, protected set]
 the dash button More...
 
MMInput.IMButton ShootButton [get, protected set]
 the shoot button More...
 
MMInput.IMButton SecondaryShootButton [get, protected set]
 the shoot button More...
 
MMInput.IMButton ReloadButton [get, protected set]
 the reload button More...
 
MMInput.IMButton PushButton [get, protected set]
 the push button More...
 
MMInput.IMButton GripButton [get, protected set]
 the grip button More...
 
MMInput.IMButton PauseButton [get, protected set]
 the pause button More...
 
MMInput.IMButton RestartButton [get, protected set]
 the restart button More...
 
MMInput.IMButton SwitchCharacterButton [get, protected set]
 the button used to switch character (either via model or prefab switch) More...
 
MMInput.IMButton SwitchWeaponButton [get, protected set]
 the switch weapon button More...
 
MMInput.IMButton TimeControlButton [get, protected set]
 the time control button More...
 
MMInput.ButtonStates ShootAxis [get, protected set]
 the shoot axis, used as a button (non analogic) More...
 
MMInput.ButtonStates SecondaryShootAxis [get, protected set]
 the shoot axis, used as a button (non analogic) More...
 
virtual Vector2 PrimaryMovement [get]
 the primary movement value (used to move the character around) More...
 
virtual Vector2 SecondaryMovement [get]
 the secondary movement (usually the right stick on a gamepad), used to aim More...
 
- Properties inherited from MoreMountains.Tools.MMSingleton< InputManager >
static T Instance [get]
 Singleton design pattern More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MoreMountains.Tools.MMSingleton< InputManager >
static T TryGetInstance ()
 
- Static Public Attributes inherited from MoreMountains.Tools.MMSingleton< InputManager >
static bool HasInstance
 
static T Current
 
- Static Protected Attributes inherited from MoreMountains.Tools.MMSingleton< InputManager >
static T _instance
 

Detailed Description

This persistent singleton handles the inputs and sends commands to the player. IMPORTANT : this script's Execution Order MUST be -100. You can define a script's execution order by clicking on the script's file and then clicking on the Execution Order button at the bottom right of the script's inspector. See https://docs.unity3d.com/Manual/class-ScriptExecution.html for more details

Member Enumeration Documentation

◆ InputForcedMode

the possible modes for this input manager

Enumerator
None 
Mobile 
Desktop 

◆ MovementControls

the possible kinds of control used for movement

Enumerator
Joystick 
Arrows 

Member Function Documentation

◆ ControlsModeDetection()

virtual void MoreMountains.CorgiEngine.InputManager.ControlsModeDetection ( )
virtual

Turns mobile controls on or off depending on what's been defined in the inspector, and what target device we're on

◆ DashButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.DashButtonDown ( )
virtual

◆ DashButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.DashButtonPressed ( )
virtual

◆ DashButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.DashButtonUp ( )
virtual

◆ FlyButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.FlyButtonDown ( )
virtual

◆ FlyButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.FlyButtonPressed ( )
virtual

◆ FlyButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.FlyButtonUp ( )
virtual

◆ ForceAllButtonStatesTo()

virtual void MoreMountains.CorgiEngine.InputManager.ForceAllButtonStatesTo ( MMInput.ButtonStates  newState)
virtual

Lets you force the state of all buttons in the InputManager to the one specified in parameters

Parameters
newState

◆ GetInputButtons()

virtual void MoreMountains.CorgiEngine.InputManager.GetInputButtons ( )
protectedvirtual

If we're not on mobile, watches for input changes, and updates our buttons states accordingly

◆ GlideButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.GlideButtonDown ( )
virtual

◆ GlideButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.GlideButtonPressed ( )
virtual

◆ GlideButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.GlideButtonUp ( )
virtual

◆ GrabButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.GrabButtonDown ( )
virtual

◆ GrabButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.GrabButtonPressed ( )
virtual

◆ GrabButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.GrabButtonUp ( )
virtual

◆ GripButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.GripButtonDown ( )
virtual

◆ GripButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.GripButtonPressed ( )
virtual

◆ GripButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.GripButtonUp ( )
virtual

◆ Initialization()

virtual void MoreMountains.CorgiEngine.InputManager.Initialization ( )
protectedvirtual

◆ InitializeAxis()

virtual void MoreMountains.CorgiEngine.InputManager.InitializeAxis ( )
protectedvirtual

Initializes the axis strings.

◆ InitializeButtons()

virtual void MoreMountains.CorgiEngine.InputManager.InitializeButtons ( )
protectedvirtual

Initializes the buttons. If you want to add more buttons, make sure to register them here.

◆ InitializeStatics()

static void MoreMountains.CorgiEngine.InputManager.InitializeStatics ( )
staticprotected

Statics initialization to support enter play modes

◆ InteractButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.InteractButtonDown ( )
virtual

◆ InteractButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.InteractButtonPressed ( )
virtual

◆ InteractButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.InteractButtonUp ( )
virtual

◆ JetpackButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.JetpackButtonDown ( )
virtual

◆ JetpackButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.JetpackButtonPressed ( )
virtual

◆ JetpackButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.JetpackButtonUp ( )
virtual

◆ JumpButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.JumpButtonDown ( )
virtual

◆ JumpButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.JumpButtonPressed ( )
virtual

◆ JumpButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.JumpButtonUp ( )
virtual

◆ LateUpdate()

virtual void MoreMountains.CorgiEngine.InputManager.LateUpdate ( )
protectedvirtual

On LateUpdate, we process our button states

◆ OnApplicationFocus()

virtual void MoreMountains.CorgiEngine.InputManager.OnApplicationFocus ( bool  hasFocus)
protectedvirtual

If we lose focus, we reset the states of all buttons

Parameters
hasFocus

◆ PauseButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.PauseButtonDown ( )
virtual

◆ PauseButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.PauseButtonPressed ( )
virtual

◆ PauseButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.PauseButtonUp ( )
virtual

◆ ProcessButtonStates()

virtual void MoreMountains.CorgiEngine.InputManager.ProcessButtonStates ( )
virtual

Called at LateUpdate(), this method processes the button states of all registered buttons

◆ PushButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.PushButtonDown ( )
virtual

◆ PushButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.PushButtonPressed ( )
virtual

◆ PushButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.PushButtonUp ( )
virtual

◆ ReloadButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.ReloadButtonDown ( )
virtual

◆ ReloadButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.ReloadButtonPressed ( )
virtual

◆ ReloadButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.ReloadButtonUp ( )
virtual

◆ RestartButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.RestartButtonDown ( )
virtual

◆ RestartButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.RestartButtonPressed ( )
virtual

◆ RestartButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.RestartButtonUp ( )
virtual

◆ RollButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.RollButtonDown ( )
virtual

◆ RollButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.RollButtonPressed ( )
virtual

◆ RollButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.RollButtonUp ( )
virtual

◆ RunButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.RunButtonDown ( )
virtual

◆ RunButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.RunButtonPressed ( )
virtual

◆ RunButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.RunButtonUp ( )
virtual

◆ SecondaryShootButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.SecondaryShootButtonDown ( )
virtual

◆ SecondaryShootButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.SecondaryShootButtonPressed ( )
virtual

◆ SecondaryShootButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.SecondaryShootButtonUp ( )
virtual

◆ SetHorizontalMovement()

virtual void MoreMountains.CorgiEngine.InputManager.SetHorizontalMovement ( float  horizontalInput)
virtual

If you're using touch arrows, bind your left/right arrows to this method

.

◆ SetMovement() [1/2]

virtual void MoreMountains.CorgiEngine.InputManager.SetMovement ( )
virtual

Called every frame, if not on mobile, gets primary movement values from input

◆ SetMovement() [2/2]

virtual void MoreMountains.CorgiEngine.InputManager.SetMovement ( Vector2  movement)
virtual

If you're using a touch joystick, bind your main joystick to this method

Parameters
movementMovement.

◆ SetSecondaryHorizontalMovement()

virtual void MoreMountains.CorgiEngine.InputManager.SetSecondaryHorizontalMovement ( float  horizontalInput)
virtual

If you're using touch arrows, bind your secondary left/right arrows to this method

.

◆ SetSecondaryMovement() [1/2]

virtual void MoreMountains.CorgiEngine.InputManager.SetSecondaryMovement ( )
virtual

Called every frame, if not on mobile, gets secondary movement values from input

◆ SetSecondaryMovement() [2/2]

virtual void MoreMountains.CorgiEngine.InputManager.SetSecondaryMovement ( Vector2  movement)
virtual

If you're using a touch joystick, bind your secondary joystick to this method

Parameters
movementMovement.

◆ SetSecondaryVerticalMovement()

virtual void MoreMountains.CorgiEngine.InputManager.SetSecondaryVerticalMovement ( float  verticalInput)
virtual

If you're using touch arrows, bind your down/up arrows to this method

.

◆ SetShootAxis()

virtual void MoreMountains.CorgiEngine.InputManager.SetShootAxis ( )
protectedvirtual

Called every frame, if not on mobile, gets shoot axis values from input

◆ SetVerticalMovement()

virtual void MoreMountains.CorgiEngine.InputManager.SetVerticalMovement ( float  verticalInput)
virtual

If you're using touch arrows, bind your secondary down/up arrows to this method

.

◆ ShootButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.ShootButtonDown ( )
virtual

◆ ShootButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.ShootButtonPressed ( )
virtual

◆ ShootButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.ShootButtonUp ( )
virtual

◆ Start()

virtual void MoreMountains.CorgiEngine.InputManager.Start ( )
protectedvirtual

On Start we look for what mode to use, and initialize our axis and buttons

Reimplemented in MoreMountains.CorgiEngine.InputSystemManager.

◆ SwimButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.SwimButtonDown ( )
virtual

◆ SwimButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.SwimButtonPressed ( )
virtual

◆ SwimButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.SwimButtonUp ( )
virtual

◆ SwitchCharacterButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchCharacterButtonDown ( )
virtual

◆ SwitchCharacterButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchCharacterButtonPressed ( )
virtual

◆ SwitchCharacterButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchCharacterButtonUp ( )
virtual

◆ SwitchWeaponButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchWeaponButtonDown ( )
virtual

◆ SwitchWeaponButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchWeaponButtonPressed ( )
virtual

◆ SwitchWeaponButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.SwitchWeaponButtonUp ( )
virtual

◆ ThrowButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.ThrowButtonDown ( )
virtual

◆ ThrowButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.ThrowButtonPressed ( )
virtual

◆ ThrowButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.ThrowButtonUp ( )
virtual

◆ TimeControlButtonDown()

virtual void MoreMountains.CorgiEngine.InputManager.TimeControlButtonDown ( )
virtual

◆ TimeControlButtonPressed()

virtual void MoreMountains.CorgiEngine.InputManager.TimeControlButtonPressed ( )
virtual

◆ TimeControlButtonUp()

virtual void MoreMountains.CorgiEngine.InputManager.TimeControlButtonUp ( )
virtual

◆ Update()

virtual void MoreMountains.CorgiEngine.InputManager.Update ( )
protectedvirtual

At update, we check the various commands and update our values and states accordingly.

Reimplemented in MoreMountains.CorgiEngine.InputSystemManager, and MoreMountains.CorgiEngine.InputSystemManagerEventsBased.

Member Data Documentation

◆ _axisHorizontal

string MoreMountains.CorgiEngine.InputManager._axisHorizontal
protected

◆ _axisSecondaryHorizontal

string MoreMountains.CorgiEngine.InputManager._axisSecondaryHorizontal
protected

◆ _axisSecondaryVertical

string MoreMountains.CorgiEngine.InputManager._axisSecondaryVertical
protected

◆ _axisShoot

string MoreMountains.CorgiEngine.InputManager._axisShoot
protected

◆ _axisShootSecondary

string MoreMountains.CorgiEngine.InputManager._axisShootSecondary
protected

◆ _axisVertical

string MoreMountains.CorgiEngine.InputManager._axisVertical
protected

◆ _primaryMovement

Vector2 MoreMountains.CorgiEngine.InputManager._primaryMovement = Vector2.zero
protected

◆ _secondaryMovement

Vector2 MoreMountains.CorgiEngine.InputManager._secondaryMovement = Vector2.zero
protected

◆ AutoMobileDetection

bool MoreMountains.CorgiEngine.InputManager.AutoMobileDetection = true

if this is set to true, the InputManager will try to detect what mode it should be in, based on the current target device

◆ ButtonList

List<MMInput.IMButton> MoreMountains.CorgiEngine.InputManager.ButtonList
protected

◆ DelayedButtonPresses

bool MoreMountains.CorgiEngine.InputManager.DelayedButtonPresses = false

if this is true, button state changes are offset by one frame (usually useful on Android)

◆ ForcedMode

InputForcedMode MoreMountains.CorgiEngine.InputManager.ForcedMode

use this to force desktop (keyboard, pad) or mobile (touch) mode

◆ HideMobileControlsInEditor

bool MoreMountains.CorgiEngine.InputManager.HideMobileControlsInEditor = false

if this is true, mobile controls will be hidden in editor mode, regardless of the current build target or the forced mode

◆ InputDetectionActive

bool MoreMountains.CorgiEngine.InputManager.InputDetectionActive = true

set this to false to prevent input to be detected

◆ MovementControl

MovementControls MoreMountains.CorgiEngine.InputManager.MovementControl = MovementControls.Joystick

use this to specify whether you want to use the default joystick or arrows to move your character

◆ PlayerID

string MoreMountains.CorgiEngine.InputManager.PlayerID = "Player1"

a string identifying the target player(s). You'll need to set this exact same string on your Character, and set its type to Player

◆ ResetButtonStatesOnFocusLoss

bool MoreMountains.CorgiEngine.InputManager.ResetButtonStatesOnFocusLoss = true

if this is true, button states will be reset on focus loss - when clicking outside the player window on PC, for example

◆ SmoothMovement

bool MoreMountains.CorgiEngine.InputManager.SmoothMovement =true

If set to true, acceleration / deceleration will take place when moving / stopping.

◆ Threshold

Vector2 MoreMountains.CorgiEngine.InputManager.Threshold = new Vector2(0.1f, 0.4f)

the minimum horizontal and vertical value you need to reach to trigger movement on an analog controller (joystick for example)

Property Documentation

◆ DashButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.DashButton
getprotected set

the dash button

◆ FlyButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.FlyButton
getprotected set

the fly button

◆ GlideButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.GlideButton
getprotected set

the glide button, used to glide in the air

◆ GrabButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.GrabButton
getprotected set

the dash button

◆ GripButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.GripButton
getprotected set

the grip button

◆ InteractButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.InteractButton
getprotected set

the activate button, used for interactions with zones

◆ IsMobile

bool MoreMountains.CorgiEngine.InputManager.IsMobile
getprotected set

if this is true, we're currently in mobile mode

◆ JetpackButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.JetpackButton
getprotected set

the jetpack button

◆ JumpButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.JumpButton
getprotected set

the jump button, used for jumps

◆ PauseButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.PauseButton
getprotected set

the pause button

◆ PrimaryMovement

virtual Vector2 MoreMountains.CorgiEngine.InputManager.PrimaryMovement
get

the primary movement value (used to move the character around)

◆ PushButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.PushButton
getprotected set

the push button

◆ ReloadButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.ReloadButton
getprotected set

the reload button

◆ RestartButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.RestartButton
getprotected set

the restart button

◆ RollButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.RollButton
getprotected set

the roll button

◆ RunButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.RunButton
getprotected set

the run button

◆ SecondaryMovement

virtual Vector2 MoreMountains.CorgiEngine.InputManager.SecondaryMovement
get

the secondary movement (usually the right stick on a gamepad), used to aim

◆ SecondaryShootAxis

MMInput.ButtonStates MoreMountains.CorgiEngine.InputManager.SecondaryShootAxis
getprotected set

the shoot axis, used as a button (non analogic)

◆ SecondaryShootButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.SecondaryShootButton
getprotected set

the shoot button

◆ ShootAxis

MMInput.ButtonStates MoreMountains.CorgiEngine.InputManager.ShootAxis
getprotected set

the shoot axis, used as a button (non analogic)

◆ ShootButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.ShootButton
getprotected set

the shoot button

◆ SwimButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.SwimButton
getprotected set

the swim button, used to swim

◆ SwitchCharacterButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.SwitchCharacterButton
getprotected set

the button used to switch character (either via model or prefab switch)

◆ SwitchWeaponButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.SwitchWeaponButton
getprotected set

the switch weapon button

◆ ThrowButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.ThrowButton
getprotected set

the dash button

◆ TimeControlButton

MMInput.IMButton MoreMountains.CorgiEngine.InputManager.TimeControlButton
getprotected set

the time control button


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