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 StartChatting (IChattable chattable)
 Hides game UI and enables chatting dialog.
 
void FinishChatting ()
 Ends interaction with the currently interacting NPC. Resets camera and player state.
 
void Chat (string message)
 Redirects response from NPC to DialogBoxManager.
 
void StartChatting (IChattable otherChatter)
 
void FinishChatting ()
 
void Chat (string message)
 

Public Attributes

float moveSpeed = 5f
 Speed at which the player moves.
 
float gravity = 9.81f
 Gravity applied to the player.
 

Static Public Attributes

static PlayerController Instance
 Singleton instance of the PlayerController class.
 

Properties

IChattable ChattingWith [get]
 Reference to chatee. NULL if talking with noone.
 
string Name [get]
 Name of the Player.
 
Transform LookTarget [get]
 Look target for chatee.
 
bool AvailableToChat [get]
 Whether Player is available to char.
 
- Properties inherited from IChattable
Transform LookTarget [get]
 
string Name [get]
 
bool AvailableToChat [get]
 

Detailed Description

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

Member Function Documentation

◆ Chat()

void PlayerController.Chat ( string  message)

Redirects response from NPC to DialogBoxManager.

Implements IChattable.

◆ FinishChatting()

void PlayerController.FinishChatting ( )

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

Implements IChattable.

◆ StartChatting()

void PlayerController.StartChatting ( IChattable  chattable)

Hides game UI and enables chatting dialog.

Implements IChattable.

◆ 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

◆ 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.

Property Documentation

◆ AvailableToChat

bool PlayerController.AvailableToChat
get

Whether Player is available to char.

Implements IChattable.

◆ ChattingWith

IChattable PlayerController.ChattingWith
get

Reference to chatee. NULL if talking with noone.

◆ LookTarget

Transform PlayerController.LookTarget
get

Look target for chatee.

Implements IChattable.

◆ Name

string PlayerController.Name
get

Name of the Player.

Implements IChattable.


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