Oakfolks Gold_1.14
Oakfolks coop game
Loading...
Searching...
No Matches
MainPlayer.h
1#pragma once
2
3#include "CoreMinimal.h"
4#include "GameFramework/Character.h"
5#include "Logging/LogMacros.h"
6#include "BCR/Headers/Interfaces/BCR_Helper.h"
7#include "BCR/Headers/Interfaces/Locomotional.h"
8#include "MainPlayer.generated.h"
9
12class USpringArmComponent;
13class UCameraComponent;
14class UInputMappingContext;
15class UInputAction;
17
19struct FInputActionValue;
20
22DECLARE_LOG_CATEGORY_EXTERN(LogTemplateCharacter, Log, All);
23
25
30UCLASS(config=Game)
31class BCR_API AMainPlayer : public ACharacter, public IBCR_Helper, public ILocomotional
32{
33 GENERATED_BODY()
34
35public:
36
39 virtual void BeginPlay();
40 virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
41
44 UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
45 void PickUp();
46 void PickUp_Implementation();
47
48 UPROPERTY(BlueprintReadWrite)
49 AActor* PickedUpObject;
50
53 UFUNCTION(BlueprintCallable)
54 void Interact();
55
58 virtual FLocomotionConfiguration ResetLocomotionConfig_Implementation() override;
59 virtual FLocomotionConfiguration SetLocomotionConfig_Implementation(ULocomotionConfigurationAsset* NewConfig) override;
60
62 virtual FString GetCustomLogInfo() const override
63 {
64 return FString::Printf(TEXT("Velocity: %.1f"), GetVelocity().Size());
65 }
66
67 bool GetPickedUpSomething();
68
69protected:
70
73 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
74 UInputMappingContext* DefaultMappingContext;
75
77 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
78 UInputAction* JumpAction;
79 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
80 UInputAction* MoveAction;
81 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
82 UInputAction* LookAction;
83
85 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
86 UInputAction* PickUpAction;
87 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
88 UInputAction* InteractAction;
89 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
90 UInputAction* PauseAction;
91
93 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
94 UInputAction* LeftTriggerAction;
95 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true"))
96 UInputAction* RightTriggerAction;
97
100 void Move(const FInputActionValue& Value);
101 void Look(const FInputActionValue& Value);
102
105 UPROPERTY(EditAnywhere, BlueprintReadWrite)
106 bool bCanMove = true;
107
110 UPROPERTY(EditAnywhere)
111 ULocomotionConfigurationAsset* DefaultLocomotionConfig;
112 ULocomotionConfigurationAsset* CurrentLocomotionConfig;
113
116 bool PickedUpSomething = false;
117};
Main player character for cooperative gameplay.
Definition MainPlayer.h:32
Custom logging system interface for BCR project.
Definition BCR_Helper.h:26
Interface for objects that can modify player locomotion behavior.
Definition Locomotional.h:33
Asset container for locomotion configuration data.
Definition LocomotionConfigurationTypes.h:81
Complete locomotion configuration for player positioning and animation.
Definition LocomotionConfigurationTypes.h:35