캐릭터 스킬 최종

This commit is contained in:
SJW1024
2023-11-15 02:14:46 +09:00
parent 598a21efc3
commit 6691dfd3fa
59 changed files with 143 additions and 72 deletions

View File

@@ -133,7 +133,7 @@ FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const
//DebugPerpose
if (Type == CharacterType::Lukriel)
{
Type = CharacterType::Allium;
Type = CharacterType::Riana;
}
if (Team == TeamType::Null)
{

View File

@@ -354,6 +354,7 @@ void ADefaultPlayerController::Skill4Triggered()
if (GetWorld()->GetUnpausedTimeSeconds() - GetPlayerState<ADefaultPlayerState>()->CooldownDuration[(uint8)CooldownType::Skill4Triggered]
<= GetPlayerState<ADefaultPlayerState>()->MaxCooldownDuration[(uint8)CooldownType::Skill4Triggered])
return;
if (!GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skillusable] == 0) {
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Idle);
return;
@@ -376,6 +377,7 @@ void ADefaultPlayerController::Skill4Triggered()
Multicast_SetRotation(GetMouseHitLocation());
Server_SetRotation(GetMouseHitLocation());
UE_LOG(LogTemp, Warning, TEXT("%f, %f"), GetWorld()->GetUnpausedTimeSeconds() - GetPlayerState<ADefaultPlayerState>()->CooldownDuration[(uint8)CooldownType::Skill4Triggered], GetPlayerState<ADefaultPlayerState>()->MaxCooldownDuration[(uint8)CooldownType::Skill4Triggered]);
UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Triggered);
@@ -407,9 +409,12 @@ void ADefaultPlayerController::Skill4Triggered()
void ADefaultPlayerController::Skill4Completed()
{
UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Comlpleted);
if (GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::charging] == 0) {
UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Comlpleted);
}
}
void ADefaultPlayerController::RuneSpell1()

View File

@@ -35,11 +35,11 @@ void ADefaultPlayerState::InitPlayerStats_Implementation(const TArray<float>& St
{
MaxStats.Append(StatsValue);
Stats.Append(StatsValue);
CooldownDuration.Append(CooldownDurationValue);
MaxCooldownDuration.Append(CooldownDurationValue);
for (float Value : CooldownDurationValue)
{
MaxCooldownDuration.Add(0.0f);
CooldownDuration.Add(0.0f);
}
for (float Value : StatsValue)