57 lines
1.7 KiB
C
Raw Normal View History

2025-06-18 10:07:14 +08:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Pawn.h"
#include "PawnWithSkill.generated.h"
2025-07-22 18:06:10 +08:00
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnReceiveDamage);
2025-06-18 10:07:14 +08:00
UCLASS()
class PROJECTFISH_API APawnWithSkill : public APawn
{
GENERATED_BODY()
public:
// Sets default values for this pawn's properties
APawnWithSkill();
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void ApplyyEndurance(float enduranceOffset);
2025-07-15 16:52:32 +08:00
UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
void ApplyyTenacity(float tenacityOffset);
2025-07-22 18:06:10 +08:00
void SetDamageReduce(int32 damageReduce);
2025-06-18 10:07:14 +08:00
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;
UPROPERTY(BlueprintReadWrite, meta = (ToolTip = "当前耐久度"))
float CurrentEndurance;
2025-07-22 18:06:10 +08:00
UPROPERTY(BlueprintReadWrite, meta = (ToolTip = "减伤值"))
float DamageReduce;
2025-06-18 10:07:14 +08:00
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= Default, meta = (DisplayPriority = 0, ToolTip = "最大耐久度"))
float MaxEndurance;
2025-07-15 16:52:32 +08:00
UPROPERTY(BlueprintReadWrite, meta = (ToolTip = "当前韧性"))
float CurrentTenacity;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= Default, meta = (DisplayPriority = 0, ToolTip = "最大韧性"))
float MaxTenacity;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category= Default, meta = (DisplayPriority = 0, ToolTip = "韧性归零时眩晕时长"))
float TenacityStun_Time = 5;
2025-07-22 18:06:10 +08:00
UPROPERTY(BlueprintAssignable)
FOnReceiveDamage OnReceiveDamage;
2025-06-18 10:07:14 +08:00
};
2025-07-15 16:52:32 +08:00