Modular First Person Player 1.0.2.7
Loading...
Searching...
No Matches
MFPP.PlayerModule Class Referenceabstract

Public Member Functions

virtual void Initialize ()
 Used for initialization.
 
virtual void BeforeUpdate ()
 Called right before updating the player.
 
virtual void AfterUpdate ()
 Called right after updating the player.
 

Protected Member Functions

float GetAxis (string axisName)
 Similar to Input.GetAxis(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.
 
float GetAxisRaw (string axisName)
 Similar to Input.GetAxisRaw(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.
 
float GetCurrentAxis (string axisName)
 Returns the current axis value, based on whetever we use MFPP.Player.ControlSettings.RawInput and also taking into account MFPP.Player.ControlSettings.ControlsEnabled.
 
bool GetButton (string buttonName)
 Similar to Input.GetButton(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.
 
bool GetButtonDown (string buttonName)
 Similar to Input.GetButtonDown(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.
 

Properties

bool Enabled [get, set]
 Is this PlayerModule enabled?
 
int ExecutionOrder [get, set]
 The execution order of this PlayerModule, lower means earlier execution.
 
Player Player [get]
 The attached global::Player to this PlayerModule.
 
Camera Camera [get]
 The attached camera to this Player. Shortcut equivalent of "Player.Main.Camera".
 

Member Function Documentation

◆ AfterUpdate()

virtual void MFPP.PlayerModule.AfterUpdate ( )
virtual

Called right after updating the player.

Reimplemented in MFPP.Modules.BobModule, MFPP.Modules.LadderModule, and MFPP.Modules.PickUpModule.

◆ GetAxis()

float MFPP.PlayerModule.GetAxis ( string axisName)
protected

Similar to Input.GetAxis(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.

Parameters
axisNameThe name of the axis.
Returns
The value of the virtual axis identified by axisName.

◆ GetAxisRaw()

float MFPP.PlayerModule.GetAxisRaw ( string axisName)
protected

Similar to Input.GetAxisRaw(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.

Parameters
axisNameThe name of the axis.
Returns
The value of the virtual axis identified by axisName.

◆ GetButton()

bool MFPP.PlayerModule.GetButton ( string buttonName)
protected

Similar to Input.GetButton(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.

Parameters
buttonNameThe name of the axis.
Returns
Returns true while the virtual button identified by buttonName is held down.

◆ GetButtonDown()

bool MFPP.PlayerModule.GetButtonDown ( string buttonName)
protected

Similar to Input.GetButtonDown(string) but also taking into account MFPP.Player.ControlSettings.ControlsEnabled.

Parameters
buttonNameThe name of the axis.
Returns
Returns true during the frame the user pressed down the virtual button identified by buttonName.

◆ GetCurrentAxis()

float MFPP.PlayerModule.GetCurrentAxis ( string axisName)
protected

Returns the current axis value, based on whetever we use MFPP.Player.ControlSettings.RawInput and also taking into account MFPP.Player.ControlSettings.ControlsEnabled.

Parameters
axisNameThe axis name.
Returns
The value of the virtual axis identified by axisName.

◆ Initialize()

virtual void MFPP.PlayerModule.Initialize ( )
virtual

Used for initialization.

Reimplemented in MFPP.Modules.LadderModule, and MFPP.Modules.RigidbodyPushModule.


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