106 lines
2.9 KiB
C++
106 lines
2.9 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "SSTCharacter.h"
|
|
#include "Logging/LogMacros.h"
|
|
|
|
#include "FunnyPrinceCharacter.generated.h"
|
|
|
|
class AEnemyCharacter;
|
|
|
|
DECLARE_LOG_CATEGORY_EXTERN(LogTemplateFunnyPrinceCharacter, Log, All);
|
|
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS(config = Game)
|
|
class FUNNYPRINCE_API AFunnyPrinceCharacter : public ASSTCharacter
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AFunnyPrinceCharacter(const FObjectInitializer& ObjectInitializer);
|
|
|
|
// APawn interface
|
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
|
|
|
// To add mapping context
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
protected:
|
|
|
|
// To add mapping context
|
|
virtual void BeginPlay() override;
|
|
|
|
virtual float TakeDamage(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, AActor* DamageCauser) override;
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
bool IsDead() const;
|
|
|
|
UFUNCTION(BlueprintPure)
|
|
float GetHealthPercent() const;
|
|
|
|
virtual bool CanJumpInternal_Implementation() const override;
|
|
|
|
void Move(const struct FInputActionValue& Value);
|
|
|
|
virtual void StartPunch();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void FinishPunching();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void PunchHitTrace();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void FinishPunchReaction();
|
|
|
|
/** Move Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = true))
|
|
TObjectPtr<class UInputAction> MoveAction2;
|
|
|
|
/** Punch Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = true))
|
|
TObjectPtr<class UInputAction> PunchAction;
|
|
|
|
/** Punch Montage */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UAnimMontage* PunchMontage;
|
|
|
|
/** Punch Reaction Montage */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UAnimMontage* PunchReactionMontage;
|
|
|
|
/** Punch Start Position */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UArrowComponent* StartAttack;
|
|
|
|
/** Punch End Position */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UArrowComponent* EndAttack;
|
|
|
|
/** Punch Input Action */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
bool CanAttack;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
float MaxHealth;
|
|
|
|
/** Current Health */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
float Health;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
float PunchDamage;
|
|
|
|
/** Whether the player can move */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
bool CanMove;
|
|
private:
|
|
|
|
public:
|
|
|
|
};
|