93 lines
2.6 KiB
C++
93 lines
2.6 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;
|
|
|
|
virtual void StartPunch();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void FinishPunching();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void PunchHitTrace();
|
|
|
|
/** Punch Input Action */
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = true))
|
|
TObjectPtr<class UInputAction> PunchAction = nullptr;
|
|
|
|
/** Punch Montage */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UAnimMontage* PunchMontage = nullptr;
|
|
|
|
/** Punch Start Position */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UArrowComponent* StartAttack = nullptr;
|
|
|
|
/** Punch End Position */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
UArrowComponent* EndAttack = nullptr;
|
|
|
|
/** Punch Input Action */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
bool CanAttack = true;
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
|
float MaxHealth = 100;
|
|
|
|
/** Current Health */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
float Health = 100;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
float PunchDamage = 10;
|
|
|
|
/** Punch End Position */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
|
TSoftObjectPtr<AEnemyCharacter> Enemy = nullptr;
|
|
|
|
private:
|
|
public:
|
|
|
|
};
|