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