Unity and Flutter apps Home Page
Work to create apps for generating revenue
Loading...
Searching...
No Matches
Player.InputReader Class Reference

Uses the New Input 'Controls'(name you choose) which causes dot net generation of controls for the scenes OnMovement is generated to connect to the Movement action(in unity) Input Actions object The Controls.IPlayerActions is then an interface that this class implments and will be called when the action takes place. More...

Inheritance diagram for Player.InputReader:
Controls.IPlayerActions

Public Member Functions

void OnDisable ()
 OnDissable is used as the InputReader is dissabled, ending callbacks and setting the service to dissabled.
void OnMovement (InputValue pInputValue)
 This is one of the implementing interface methods that will be called when the action takes place. However, this old input system using a parameter of InputValue. The new input action is below.
void OnJump (InputValue pInputValue)
void OnMovement (InputAction.CallbackContext context)
 This is using the new input system with its signature of CallbackContext(which is more rich in functionality) The fact its value is a Vector2 comes from the unity setup of the action properties It uses the Actions class to connect it to interested consumers of change.
void OnCameraMove (InputAction.CallbackContext context)
void OnJump (InputAction.CallbackContext context)
void OnQuit (InputAction.CallbackContext context)

Detailed Description

Uses the New Input 'Controls'(name you choose) which causes dot net generation of controls for the scenes OnMovement is generated to connect to the Movement action(in unity) Input Actions object The Controls.IPlayerActions is then an interface that this class implments and will be called when the action takes place.

Member Function Documentation

◆ OnCameraMove()

void Player.InputReader.OnCameraMove ( InputAction.CallbackContext context)

◆ OnDisable()

void Player.InputReader.OnDisable ( )

OnDissable is used as the InputReader is dissabled, ending callbacks and setting the service to dissabled.

◆ OnJump() [1/2]

void Player.InputReader.OnJump ( InputAction.CallbackContext context)

◆ OnJump() [2/2]

void Player.InputReader.OnJump ( InputValue pInputValue)

◆ OnMovement() [1/2]

void Player.InputReader.OnMovement ( InputAction.CallbackContext context)

This is using the new input system with its signature of CallbackContext(which is more rich in functionality) The fact its value is a Vector2 comes from the unity setup of the action properties It uses the Actions class to connect it to interested consumers of change.

Parameters
context

Implements Controls.IPlayerActions.

◆ OnMovement() [2/2]

void Player.InputReader.OnMovement ( InputValue pInputValue)

This is one of the implementing interface methods that will be called when the action takes place. However, this old input system using a parameter of InputValue. The new input action is below.

Parameters
pInputValue

◆ OnQuit()

void Player.InputReader.OnQuit ( InputAction.CallbackContext context)

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