코스트 체크 완성
This commit is contained in:
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/Maps/DevMap.umap
(Stored with Git LFS)
BIN
Content/Maps/DevMap.umap
(Stored with Git LFS)
Binary file not shown.
@@ -246,8 +246,8 @@ void ADefaultPlayerController::SetupInputComponent()
|
||||
|
||||
void ADefaultPlayerController::Skill1()
|
||||
{
|
||||
//if (!(GetPlayerState<ADefaultPlayerState>()->Stats.Mana >= 100))
|
||||
// return;
|
||||
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill1Cost]))
|
||||
return;
|
||||
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.Z = 0;
|
||||
@@ -265,6 +265,9 @@ void ADefaultPlayerController::Skill1()
|
||||
|
||||
void ADefaultPlayerController::Skill2()
|
||||
{
|
||||
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill2Cost]))
|
||||
return;
|
||||
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.Z = 0;
|
||||
|
||||
@@ -281,6 +284,9 @@ void ADefaultPlayerController::Skill2()
|
||||
|
||||
void ADefaultPlayerController::Skill3()
|
||||
{
|
||||
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill3Cost]))
|
||||
return;
|
||||
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.Z = 0;
|
||||
|
||||
@@ -297,6 +303,9 @@ void ADefaultPlayerController::Skill3()
|
||||
|
||||
void ADefaultPlayerController::Skill4Triggered()
|
||||
{
|
||||
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill4Cost]))
|
||||
return;
|
||||
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.Z = 0;
|
||||
|
||||
@@ -313,15 +322,6 @@ void ADefaultPlayerController::Skill4Triggered()
|
||||
|
||||
void ADefaultPlayerController::Skill4Completed()
|
||||
{
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.Z = 0;
|
||||
|
||||
Server_StopMove();
|
||||
Multicast_StopMove();
|
||||
|
||||
Multicast_SetRotation(GetMouseHitLocation());
|
||||
Server_SetRotation(GetMouseHitLocation());
|
||||
|
||||
UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed"));
|
||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Comlpleted);
|
||||
|
||||
@@ -96,7 +96,7 @@ enum class EStats : uint8
|
||||
{
|
||||
Health,
|
||||
HPRegeneration,
|
||||
HealAndShieldpower,
|
||||
HealAndShieldpower,
|
||||
Armor,
|
||||
MagicResistance,
|
||||
Tenacity,
|
||||
@@ -127,5 +127,9 @@ enum class EStats : uint8
|
||||
HealthRegenerationGrowth,
|
||||
ManaGrowth,
|
||||
ManaRegenerationGrowth,
|
||||
Skill1Cost,
|
||||
Skill2Cost,
|
||||
Skill3Cost,
|
||||
Skill4Cost,
|
||||
SIZE
|
||||
};
|
||||
Reference in New Issue
Block a user