2024-09-22 21:11:19 +00:00
|
|
|
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
2024-10-24 02:34:02 +00:00
|
|
|
#include "Data/OLSLocomotionData.h"
|
2024-09-22 21:11:19 +00:00
|
|
|
#include "GameFramework/Character.h"
|
|
|
|
#include "Interfaces/OLSAnimationInterface.h"
|
|
|
|
#include "Interfaces/OLSMoveableInterface.h"
|
|
|
|
#include "Interfaces/OLSReplicatedMovableInterface.h"
|
|
|
|
#include "OLSCharacter.generated.h"
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
class OLS_API AOLSCharacter : public ACharacter,
|
|
|
|
public IOLSMoveableInterface,
|
|
|
|
public IOLSAnimationInterface
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Sets default values for this character's properties
|
|
|
|
AOLSCharacter(const FObjectInitializer& objectInitializer);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
// Called when the game starts or when spawned
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
// Called every frame
|
|
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
|
|
|
|
// Called to bind functionality to input
|
|
|
|
virtual void SetupPlayerInputComponent(class UInputComponent* playerInputComponent) override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
//~ IOLSMoveableInterface BEGIN
|
|
|
|
virtual class UPawnMovementComponent* GetMovementComponent() const override;
|
|
|
|
virtual class UOLSLocomotionComponent* GetLocomotionComponent() const override;
|
|
|
|
virtual float GetMaxAcceleration() const override;
|
|
|
|
virtual FVector GetCurrentAcceleration() const override;
|
|
|
|
virtual EMovementMode GetMovementMode() const override;
|
|
|
|
|
|
|
|
virtual void SetMaxWalkSpeed(const float newMaxWalkSpeed) override;
|
2024-10-23 22:41:23 +00:00
|
|
|
virtual bool IsOrientRotationToMovement() const override;
|
2024-09-22 21:11:19 +00:00
|
|
|
//~ IOLSMoveableInterface END
|
|
|
|
|
|
|
|
//~ IOLSAnimationInterface BEGIN
|
|
|
|
virtual class UAnimInstance* GetAnimInstance() const override;
|
|
|
|
//~ IOLSAnimationInterface END
|
2024-10-24 02:34:02 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void OnRotationModeChanged(const EOLSRotationMode& prevrRotationMode);
|
2024-09-22 21:11:19 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Components)
|
|
|
|
TObjectPtr<class UOLSLocomotionComponent> LocomotionComponent = nullptr;
|
|
|
|
};
|