Oakfolks Gold_1.14
Oakfolks coop game
Loading...
Searching...
No Matches
AMainPlayer Class Reference

Main player character for cooperative gameplay. More...

#include <MainPlayer.h>

Inheritance diagram for AMainPlayer:
Collaboration diagram for AMainPlayer:

Public Member Functions

 AMainPlayer ()
 Initializes the main player with default character settings.
 
virtual void BeginPlay ()
 Initializes the player when spawned in the world.
 
virtual void SetupPlayerInputComponent (class UInputComponent *PlayerInputComponent) override
 Configures input action bindings for the player.
 
void PickUp ()
 
void PickUp_Implementation ()
 Toggles pickup state for objects in front of the player.
 
void Interact ()
 Handles interaction with world objects.
 
virtual FLocomotionConfiguration ResetLocomotionConfig_Implementation () override
 Resets locomotion configuration to default settings.
 
virtual FLocomotionConfiguration SetLocomotionConfig_Implementation (ULocomotionConfigurationAsset *NewConfig) override
 Applies a new locomotion configuration.
 
virtual FString GetCustomLogInfo () const override
 IBCR_Helper interface.
 
bool GetPickedUpSomething ()
 
- Public Member Functions inherited from IBCR_Helper
virtual void CustomLogConsole (const FString &Message=TEXT(""))
 Custom logging without context.
 
virtual void CustomLogScreen (const FString &Message=TEXT(""), float Duration=5.0f, FColor Color=FColor::White)
 Logs a custom message to the screen without object context.
 
virtual void CustomLogAll (const FString &Message=TEXT(""), float Duration=5.0f, FColor Color=FColor::White)
 Logs a custom message to both console and screen without object context.
 
- Public Member Functions inherited from ILocomotional
FLocomotionConfiguration SetLocomotionConfig (ULocomotionConfigurationAsset *NewConfig)
 
FLocomotionConfiguration ResetLocomotionConfig ()
 Configuration reset.
 

Public Attributes

AActor * PickedUpObject
 

Protected Member Functions

void Move (const FInputActionValue &Value)
 Handles player movement input.
 
void Look (const FInputActionValue &Value)
 Handles player camera look input.
 

Protected Attributes

UInputMappingContext * DefaultMappingContext
 
UInputAction * JumpAction
 Movement actions.
 
UInputAction * MoveAction
 
UInputAction * LookAction
 
UInputAction * PickUpAction
 Interaction actions.
 
UInputAction * InteractAction
 
UInputAction * PauseAction
 
UInputAction * LeftTriggerAction
 Trigger actions.
 
UInputAction * RightTriggerAction
 
bool bCanMove = true
 
ULocomotionConfigurationAssetDefaultLocomotionConfig
 
ULocomotionConfigurationAssetCurrentLocomotionConfig
 
bool PickedUpSomething = false
 

Additional Inherited Members

- Static Public Member Functions inherited from IBCR_Helper
static void LogConsole (const UObject *Context, const FString &Message=TEXT(""))
 Logs a message to the console with object context.
 
static void LogScreen (const UObject *Context, const FString &Message=TEXT(""), float Duration=5.0f, FColor Color=FColor::White)
 Logs a message to the screen with object context.
 
static void LogAll (const UObject *Context, const FString &Message=TEXT(""), float Duration=5.0f, FColor Color=FColor::White)
 Logs a message to both console and screen with object context.
 
static FString GetBasicObjectInfo (const UObject *Object)
 Extracts basic information from a UObject.
 

Detailed Description

Main player character for cooperative gameplay.

Handles input processing, locomotion configuration, object interaction, and pickup system

Constructor & Destructor Documentation

◆ AMainPlayer()

AMainPlayer::AMainPlayer ( )

Initializes the main player with default character settings.

Sets up collision capsule, character movement, and default physics properties

Member Function Documentation

◆ BeginPlay()

void AMainPlayer::BeginPlay ( )
virtual

Initializes the player when spawned in the world.

Sets up enhanced input mapping context and resets locomotion configuration

Here is the call graph for this function:

◆ GetCustomLogInfo()

virtual FString AMainPlayer::GetCustomLogInfo ( ) const
inlineoverridevirtual

IBCR_Helper interface.

Implements IBCR_Helper.

◆ Interact()

void AMainPlayer::Interact ( )

Handles interaction with world objects.

INTERACTION SYSTEM //////// World interactions

Detects interactable objects and calls appropriate interaction methods

Here is the caller graph for this function:

◆ Look()

void AMainPlayer::Look ( const FInputActionValue & Value)
protected

Handles player camera look input.

Processes look input for camera control (currently disabled for fixed camera)

Parameters
ValueInput action value containing look vector
Here is the caller graph for this function:

◆ Move()

void AMainPlayer::Move ( const FInputActionValue & Value)
protected

Handles player movement input.

INPUT HANDLERS //////// Movement processing

Processes 2D movement vector and applies it relative to camera orientation

Parameters
ValueInput action value containing movement vector
Here is the caller graph for this function:

◆ PickUp()

void AMainPlayer::PickUp ( )

PICKUP SYSTEM //////// Object manipulation

Here is the caller graph for this function:

◆ PickUp_Implementation()

void AMainPlayer::PickUp_Implementation ( )

Toggles pickup state for objects in front of the player.

Picks up objects if hands are empty, drops held objects if carrying something

◆ ResetLocomotionConfig_Implementation()

FLocomotionConfiguration AMainPlayer::ResetLocomotionConfig_Implementation ( )
overridevirtual

Resets locomotion configuration to default settings.

INTERFACE IMPLEMENTATIONS //////// ILocomotional interface

Restores normal movement behavior from the default configuration asset

Returns
The default locomotion configuration that was applied

Reimplemented from ILocomotional.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetLocomotionConfig_Implementation()

FLocomotionConfiguration AMainPlayer::SetLocomotionConfig_Implementation ( ULocomotionConfigurationAsset * NewConfig)
overridevirtual

Applies a new locomotion configuration.

Sets movement constraints and positioning for machine interactions

Parameters
NewConfigThe locomotion configuration asset to apply
Returns
The runtime locomotion configuration that was applied

Reimplemented from ILocomotional.

Here is the call graph for this function:

◆ SetupPlayerInputComponent()

void AMainPlayer::SetupPlayerInputComponent ( class UInputComponent * PlayerInputComponent)
overridevirtual

Configures input action bindings for the player.

Sets up Enhanced Input system with movement, interaction, and pickup controls

Parameters
PlayerInputComponentThe input component to bind actions to
Here is the call graph for this function:

Member Data Documentation

◆ bCanMove

bool AMainPlayer::bCanMove = true
protected

MOVEMENT SYSTEM //////// Movement configuration

◆ DefaultLocomotionConfig

ULocomotionConfigurationAsset* AMainPlayer::DefaultLocomotionConfig
protected

LOCOMOTION SYSTEM //////// Locomotion configuration

◆ DefaultMappingContext

UInputMappingContext* AMainPlayer::DefaultMappingContext
protected

INPUT MAPPING //////// Enhanced Input System

◆ PickedUpSomething

bool AMainPlayer::PickedUpSomething = false
protected

PICKUP STATE //////// Pickup tracking


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