Raymond Maarloeve
Loading...
Searching...
No Matches
PlayerController Class Reference

Manages player movement, interaction with NPCs, and state transitions. Handles gravity, animations, and camera behavior during interactions. More...

Public Member Functions

void StartInteraction (NPC npc)
 Starts interaction with the specified NPC. Adjusts camera and player state for interaction.
 
void EndInteraction ()
 Ends interaction with the currently interacting NPC. Resets camera and player state.
 

Public Attributes

float moveSpeed = 5f
 Speed at which the player moves.
 
float gravity = 9.81f
 Gravity applied to the player.
 
NPC currentlyInteractingNPC = null
 Reference to the NPC the player is currently interacting with.
 

Static Public Attributes

static PlayerController Instance
 Singleton instance of the PlayerController class.
 

Detailed Description

Manages player movement, interaction with NPCs, and state transitions. Handles gravity, animations, and camera behavior during interactions.

Member Function Documentation

◆ EndInteraction()

void PlayerController.EndInteraction ( )

Ends interaction with the currently interacting NPC. Resets camera and player state.

◆ StartInteraction()

void PlayerController.StartInteraction ( NPC  npc)

Starts interaction with the specified NPC. Adjusts camera and player state for interaction.

Parameters
npcThe NPC to interact with.

Member Data Documentation

◆ currentlyInteractingNPC

NPC PlayerController.currentlyInteractingNPC = null

Reference to the NPC the player is currently interacting with.

◆ gravity

float PlayerController.gravity = 9.81f

Gravity applied to the player.

◆ Instance

PlayerController PlayerController.Instance
static

Singleton instance of the PlayerController class.

◆ moveSpeed

float PlayerController.moveSpeed = 5f

Speed at which the player moves.


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