평타 알고리즘 최종(duration 초기화/적 캐릭터만 지정 기능 추가 필요)
캐릭터 체력바 UI 추가(실시간 업데이트 구현 실패) MaxStats Enum 추가, stats에 경험치 관련 스탯 추가
This commit is contained in:
@@ -30,9 +30,6 @@ ADefaultPlayerCharacter::ADefaultPlayerCharacter()
|
||||
|
||||
for (uint8 i = 0; i < (uint8)CooldownType::SIZE; i++)
|
||||
CooldownDuration.Add((CooldownType)i, 0.0f);
|
||||
|
||||
for (uint8 i = 0; i < (uint8)EMaxStats::SIZE; i++)
|
||||
DefaultMaxStats.Add((EMaxStats)i, 0.0f);
|
||||
}
|
||||
|
||||
void ADefaultPlayerCharacter::Tick(float DeltaTime)
|
||||
|
||||
@@ -102,10 +102,6 @@ public:
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
|
||||
TMap<CooldownType, float> CooldownDuration;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
|
||||
TMap<EMaxStats, float> DefaultMaxStats;
|
||||
|
||||
protected:
|
||||
UPROPERTY(EditAnywhere)
|
||||
USpringArmComponent* CameraSpringArm;
|
||||
|
||||
@@ -59,11 +59,9 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn)
|
||||
|
||||
TArray<float> DefaultStatsValue;
|
||||
TArray<float> CooldownDurationValue;
|
||||
TArray<float> DefaultMaxStatsValue;
|
||||
|
||||
ControlledPawn->DefaultStats.GenerateValueArray(DefaultStatsValue);
|
||||
ControlledPawn->CooldownDuration.GenerateValueArray(CooldownDurationValue);
|
||||
ControlledPawn->DefaultMaxStats.GenerateValueArray(DefaultMaxStatsValue);
|
||||
|
||||
MyPlayerState->InitPlayerStats(DefaultStatsValue, CooldownDurationValue);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
|
||||
void NetMulticast_SetAttackType(CooldownType Value);
|
||||
UFUNCTION(BlueprintCallable)
|
||||
CooldownType GetAttackType() const { return AttackType; }
|
||||
CooldownType GetAttackType() const { return AttackType; }
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
int32 GetCharacterLevel() const;
|
||||
|
||||
@@ -131,22 +131,5 @@ enum class EStats : uint8
|
||||
Skill2Cost,
|
||||
Skill3Cost,
|
||||
Skill4Cost,
|
||||
Skill1Level,
|
||||
Skill2Level,
|
||||
Skill3Level,
|
||||
Skill4Level,
|
||||
Exp,
|
||||
PlayerLevel,
|
||||
SkillPoint,
|
||||
SIZE
|
||||
};
|
||||
|
||||
UENUM(BlueprintType)
|
||||
enum class EMaxStats : uint8
|
||||
{
|
||||
HealthMax,
|
||||
ManaMax,
|
||||
EnergyMax,
|
||||
ExpMax,
|
||||
SIZE
|
||||
};
|
||||
Reference in New Issue
Block a user