From 326ae353d360aacd2d1eb932869242587ed51bef Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Sat, 7 Oct 2023 20:13:01 +0900 Subject: [PATCH 01/15] =?UTF-8?q?=ED=9A=8C=EC=A0=84=EB=B0=A9=ED=96=A5=20?= =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Promether/GameModeBase/Deathmatch.cpp | 2 +- .../PlayerGeneric/DefaultPlayerCharacter.h | 47 ++----------- .../PlayerGeneric/DefaultPlayerController.cpp | 68 +++++++----------- .../PlayerGeneric/DefaultPlayerController.h | 10 ++- .../PlayerGeneric/DefaultPlayerState.cpp | 69 ++++++++++--------- .../Promether/PlayerGeneric/PerformSkill.cpp | 6 -- Source/Promether/PlayerGeneric/PerformSkill.h | 28 -------- 7 files changed, 74 insertions(+), 156 deletions(-) delete mode 100644 Source/Promether/PlayerGeneric/PerformSkill.cpp delete mode 100644 Source/Promether/PlayerGeneric/PerformSkill.h diff --git a/Source/Promether/GameModeBase/Deathmatch.cpp b/Source/Promether/GameModeBase/Deathmatch.cpp index 8c6ea7e..db8175f 100644 --- a/Source/Promether/GameModeBase/Deathmatch.cpp +++ b/Source/Promether/GameModeBase/Deathmatch.cpp @@ -133,7 +133,7 @@ FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const //DebugPerpose if (Type == CharacterType::Lukriel) { - Type = CharacterType::Allium; + Type = CharacterType::Lb; } if (Team == TeamType::Null) { diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index 9cfb097..f7d5601 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -89,47 +89,6 @@ public: UFUNCTION(NetMulticast, Reliable) void NetMulticast_Skill7(); - float GetHealth() const { return Health; } - float GetHPRegeneration() const { return HPRegeneration; } - float GetHealAndShieldpower() const { return HealAndShieldpower; } - float GetArmor() const { return Armor; } - float GetMagicResistance() const { return MagicResistance; } - float GetTenacity() const { return Tenacity; } - float GetSlowRisist() const { return SlowRisist; } - float GetAttackSpeed() const { return AttackSpeed; } - float GetAttackDamage() const { return AttackDamage; } - float GetAbilityPower() const { return AbilityPower; } - float GetCriticalStrikeChance() const { return CriticalStrikeChance; } - float GetCriticalStrikeDamage() const { return CriticalStrikeDamage; } - float GetArmorPenetration() const { return ArmorPenetration; } - float GetMagicPenetration() const { return MagicPenetration; } - float GetLifeSteal() const { return LifeSteal; } - float GetPhysicalVamp() const { return PhysicalVamp; } - float GetOmnivamp() const { return Omnivamp; } - float GetAbilityHaste() const { return AbilityHaste; } - const float* GetCooldownDuration() const { return CooldownDuration; } - float GetMana() const { return Mana; } - float GetManaRegeneration() const { return ManaRegeneration; } - float GetEnergy() const { return Energy; } - float GetEnergyRegeneration() const { return EnergyRegeneration; } - float GetAttackRange() const { return AttackRange; } - float GetMovementSpeed() const { return MovementSpeed; } - float GetGoldGeneration() const { return GoldGeneration; } - float GetAttackDamageGrowth() const { return AttackDamageGrowth; } - float GetAttackSpeedGrowth() const { return AttackSpeedGrowth; } - float GetArmorGrowth() const { return ArmorGrowth; } - float GetMagicResistanceGrowth() const { return MagicResistanceGrowth; } - float GetHealthGrowth() const { return HealthGrowth; } - float GetHealthRegenerationGrowth() const { return HealthRegenerationGrowth; } - float GetManaGrowth() const { return ManaGrowth; } - float GetManaRegenerationGrowth() const { return ManaRegenerationGrowth; } - -protected: - UPROPERTY(EditAnywhere) - USpringArmComponent* CameraSpringArm; - UPROPERTY(EditAnywhere) - UCameraComponent* Camera; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") float Health; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") @@ -206,4 +165,10 @@ protected: float ManaGrowth; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") float ManaRegenerationGrowth; + +protected: + UPROPERTY(EditAnywhere) + USpringArmComponent* CameraSpringArm; + UPROPERTY(EditAnywhere) + UCameraComponent* Camera; }; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 6e6e94b..10ac6d9 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -221,13 +221,13 @@ void ADefaultPlayerController::SetupInputComponent() EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2); EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3); EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4); + EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4); EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1); EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2); EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward); EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb); EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect); - EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::MoveTriggered); - EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Started, this, &ADefaultPlayerController::MoveStarted); + EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Move); } } @@ -236,13 +236,7 @@ void ADefaultPlayerController::Skill1() //if (!(GetPlayerState()->Stats.Mana >= 100)) // return; - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; - - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); - - GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation()); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill1")); GetPlayerState()->SetState(ECharacterState::Attack); @@ -251,13 +245,7 @@ void ADefaultPlayerController::Skill1() void ADefaultPlayerController::Skill2() { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; - - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); - - GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation()); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill2")); GetPlayerState()->SetState(ECharacterState::Attack); @@ -266,30 +254,18 @@ void ADefaultPlayerController::Skill2() void ADefaultPlayerController::Skill3() { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; - - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); - - GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation()); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill3")); GetPlayerState()->SetState(ECharacterState::Attack); GetPlayerState()->SetAttackType(CooldownType::Skill3); } -void ADefaultPlayerController::Skill4() +void ADefaultPlayerController::Skill4(const FInputActionValue& Value) { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; + Server_SetRotation(GetMouseHitLocation()); - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); - - GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation()); - - UE_LOG(LogTemp, Warning, TEXT("Skill4")); + UE_LOG(LogTemp, Warning, TEXT("Skill4 %x"), Value); GetPlayerState()->SetState(ECharacterState::Attack); GetPlayerState()->SetAttackType(CooldownType::Skill4Started); } @@ -338,16 +314,6 @@ void ADefaultPlayerController::ObjectSelect() } } -void ADefaultPlayerController::MoveTriggered() -{ - Move(); -} - -void ADefaultPlayerController::MoveStarted() -{ - Move(); -} - void ADefaultPlayerController::Move() { FVector Destination = GetMouseHitLocation(); @@ -357,13 +323,29 @@ void ADefaultPlayerController::Move() this->MoveToLocation(Destination); } +void ADefaultPlayerController::Multicast_SetRotation_Implementation(FVector MouseHitLocation) +{ + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + + GetPawn()->SetActorRotation((MouseHitLocation - Location).Rotation()); +} + +void ADefaultPlayerController::Server_SetRotation_Implementation(FVector MouseHitLocation) +{ + Multicast_SetRotation(MouseHitLocation); +} + FVector ADefaultPlayerController::GetMouseHitLocation() { FHitResult HitResult; GetHitResultUnderCursor(ECollisionChannel::ECC_Visibility, true, HitResult); HitResult.Location.Z = 0; - UE_LOG(LogTemp, Warning, TEXT("Client%d MoveTo : (%f, %f)"), GPlayInEditorID, HitResult.Location.X, HitResult.Location.Y); + //UE_LOG(LogTemp, Warning, TEXT("Client%d MoveTo : (%f, %f)"), GPlayInEditorID, HitResult.Location.X, HitResult.Location.Y); FVector ActorLocation = GetPawn()->GetActorLocation(); ActorLocation.Z = 0; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index 22d92c7..a510b0b 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -34,19 +34,23 @@ public: void Skill1(); void Skill2(); void Skill3(); - void Skill4(); + void Skill4(const FInputActionValue& Value); void RuneSpell1(); void RuneSpell2(); void Ward(); void Bomb(); void ObjectSelect(); - void MoveTriggered(); - void MoveStarted(); void Move(); UFUNCTION(Server, Reliable) void MoveToLocation(FVector Location); + UFUNCTION(NetMulticast, Reliable) + void Multicast_SetRotation(FVector MouseHitLocation); + + UFUNCTION(Server, Reliable) + void Server_SetRotation(FVector MouseHitLocation); + FVector GetMouseHitLocation(); UFUNCTION(BlueprintCallable, Category = "AI|Navigation") diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp index f8468af..724738c 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp @@ -6,6 +6,7 @@ ADefaultPlayerState::ADefaultPlayerState() CharacterBPRef = nullptr;; Team = TeamType::Null; State = ECharacterState::Idle; + InitPlayerStats(); } void ADefaultPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const @@ -30,42 +31,42 @@ void ADefaultPlayerState::InitPlayerStats() { ADefaultPlayerCharacter* Initializer = Cast(CharacterBPRef); - Stats.Health = Initializer->GetHealth(); - Stats.HPRegeneration = Initializer->GetHPRegeneration(); - Stats.HealAndShieldpower = Initializer->GetHealAndShieldpower(); - Stats.Armor = Initializer->GetArmor(); - Stats.MagicResistance = Initializer->GetMagicResistance(); - Stats.Tenacity = Initializer->GetTenacity(); - Stats.SlowRisist = Initializer->GetSlowRisist(); - Stats.AttackSpeed = Initializer->GetAttackSpeed(); - Stats.AttackDamage = Initializer->GetAttackDamage(); - Stats.AbilityPower = Initializer->GetAbilityPower(); - Stats.CriticalStrikeChance = Initializer->GetCriticalStrikeChance(); - Stats.CriticalStrikeDamage = Initializer->GetCriticalStrikeDamage(); - Stats.ArmorPenetration = Initializer->GetArmorPenetration(); - Stats.MagicPenetration = Initializer->GetMagicPenetration(); - Stats.LifeSteal = Initializer->GetLifeSteal(); - Stats.PhysicalVamp = Initializer->GetPhysicalVamp(); - Stats.Omnivamp = Initializer->GetOmnivamp(); - Stats.AbilityHaste = Initializer->GetAbilityHaste(); + Stats.Health = Initializer->Health; + Stats.HPRegeneration = Initializer->HPRegeneration; + Stats.HealAndShieldpower = Initializer->HealAndShieldpower; + Stats.Armor = Initializer->Armor; + Stats.MagicResistance = Initializer->MagicResistance; + Stats.Tenacity = Initializer->Tenacity; + Stats.SlowRisist = Initializer->SlowRisist; + Stats.AttackSpeed = Initializer->AttackSpeed; + Stats.AttackDamage = Initializer->AttackDamage; + Stats.AbilityPower = Initializer->AbilityPower; + Stats.CriticalStrikeChance = Initializer->CriticalStrikeChance; + Stats.CriticalStrikeDamage = Initializer->CriticalStrikeDamage; + Stats.ArmorPenetration = Initializer->ArmorPenetration; + Stats.MagicPenetration = Initializer->MagicPenetration; + Stats.LifeSteal = Initializer->LifeSteal; + Stats.PhysicalVamp = Initializer->PhysicalVamp; + Stats.Omnivamp = Initializer->Omnivamp; + Stats.AbilityHaste = Initializer->AbilityHaste; - SetMultipleCooldownDuration(Initializer->GetCooldownDuration()); + SetMultipleCooldownDuration(Initializer->CooldownDuration); - Stats.Mana = Initializer->GetMana(); - Stats.ManaRegeneration = Initializer->GetManaRegeneration(); - Stats.Energy = Initializer->GetEnergy(); - Stats.EnergyRegeneration = Initializer->GetEnergyRegeneration(); - Stats.AttackRange = Initializer->GetAttackRange(); - Stats.MovementSpeed = Initializer->GetMovementSpeed(); - Stats.GoldGeneration = Initializer->GetGoldGeneration(); - Stats.AttackDamageGrowth = Initializer->GetAttackDamageGrowth(); - Stats.AttackSpeedGrowth = Initializer->GetAttackSpeedGrowth(); - Stats.ArmorGrowth = Initializer->GetArmorGrowth(); - Stats.MagicResistanceGrowth = Initializer->GetMagicResistanceGrowth(); - Stats.HealthGrowth = Initializer->GetHealthGrowth(); - Stats.HealthRegenerationGrowth = Initializer->GetHealthRegenerationGrowth(); - Stats.ManaGrowth = Initializer->GetManaGrowth(); - Stats.ManaRegenerationGrowth = Initializer->GetManaRegenerationGrowth(); + Stats.Mana = Initializer->Mana; + Stats.ManaRegeneration = Initializer->ManaRegeneration; + Stats.Energy = Initializer->Energy; + Stats.EnergyRegeneration = Initializer->EnergyRegeneration; + Stats.AttackRange = Initializer->AttackRange; + Stats.MovementSpeed = Initializer->MovementSpeed; + Stats.GoldGeneration = Initializer->GoldGeneration; + Stats.AttackDamageGrowth = Initializer->AttackDamageGrowth; + Stats.AttackSpeedGrowth = Initializer->AttackSpeedGrowth; + Stats.ArmorGrowth = Initializer->ArmorGrowth; + Stats.MagicResistanceGrowth = Initializer->MagicResistanceGrowth; + Stats.HealthGrowth = Initializer->HealthGrowth; + Stats.HealthRegenerationGrowth = Initializer->HealthRegenerationGrowth; + Stats.ManaGrowth = Initializer->ManaGrowth; + Stats.ManaRegenerationGrowth = Initializer->ManaRegenerationGrowth; } void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value) diff --git a/Source/Promether/PlayerGeneric/PerformSkill.cpp b/Source/Promether/PlayerGeneric/PerformSkill.cpp deleted file mode 100644 index 1d1dd9f..0000000 --- a/Source/Promether/PlayerGeneric/PerformSkill.cpp +++ /dev/null @@ -1,6 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - - -#include "PerformSkill.h" - -// Add default functionality here for any IPerformSkill functions that are not pure virtual. diff --git a/Source/Promether/PlayerGeneric/PerformSkill.h b/Source/Promether/PlayerGeneric/PerformSkill.h deleted file mode 100644 index ee6f11b..0000000 --- a/Source/Promether/PlayerGeneric/PerformSkill.h +++ /dev/null @@ -1,28 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - -#pragma once - -#include "CoreMinimal.h" -#include "UObject/Interface.h" -#include "PerformSkill.generated.h" - -// This class does not need to be modified. -UINTERFACE(MinimalAPI) -class UPerformSkill : public UInterface -{ - GENERATED_BODY() -}; - -/** - * - */ -class PROMETHER_API IPerformSkill -{ - GENERATED_BODY() - - // Add interface functions to this class. This is the class that will be inherited to implement this interface. -public: - virtual void Skill4Started() = 0; - virtual void Skill4Triggered() = 0; - virtual void Skill4Completed() = 0; -}; From deef14d8b58c7321434f364648e02b02432baf6a Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Sat, 7 Oct 2023 20:45:53 +0900 Subject: [PATCH 02/15] =?UTF-8?q?=EC=9D=B4=EC=83=81=ED=95=9C=20=EB=A7=B5?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20abp=20=EA=B5=AC=EC=A1=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/Animation/ABP_Lb.uasset | 4 ++-- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Maps/DevMap.umap | 4 ++-- Content/Maps/Untitled.umap | 3 --- .../PlayerGeneric/DefaultPlayerController.cpp | 19 ++++++++++++++----- .../PlayerGeneric/DefaultPlayerController.h | 3 ++- .../PlayerGeneric/DefaultPlayerState.cpp | 1 - 7 files changed, 22 insertions(+), 16 deletions(-) delete mode 100644 Content/Maps/Untitled.umap diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 8700d33..0a42e01 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9106395cf5962f94dbfd58c77289cabe04829abd6c6d4e94fd1dc650d77deb29 -size 275233 +oid sha256:e790215f1968518d97a61ff6d8c56f7d14c3c7d7cb481025827daf3c4b0a90c6 +size 290801 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index ed5ae7a..e2d5ea3 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5823f96c3536dcb4e632cd19dfc682a50b9b02d64e73e61f1fecbc0b09e4b4da -size 147586 +oid sha256:44edc4eaf0c0147046acc14266f5165ad830fbb9574d289de136b32cdbc08076 +size 139532 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 25747db..132dd6f 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09c5c53a199a7602b7c34db2f1a33dd24dfb54c381cda29ed3b10b8175950004 -size 181094 +oid sha256:83759f90f993a37a6439fbe14a2bbd7701fee19631dab8a196432ca80a6eef09 +size 181915 diff --git a/Content/Maps/Untitled.umap b/Content/Maps/Untitled.umap deleted file mode 100644 index 7a9aa03..0000000 --- a/Content/Maps/Untitled.umap +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a36218beca4eff11888aaf61c012df87c726ffca88541348f67089f84fc6ce11 -size 178041 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 10ac6d9..ee3bd3e 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -220,8 +220,8 @@ void ADefaultPlayerController::SetupInputComponent() EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1); EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2); EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3); - EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4); - EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4); + EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4Triggered); + EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4Completed); EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1); EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2); EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward); @@ -261,13 +261,22 @@ void ADefaultPlayerController::Skill3() GetPlayerState()->SetAttackType(CooldownType::Skill3); } -void ADefaultPlayerController::Skill4(const FInputActionValue& Value) +void ADefaultPlayerController::Skill4Triggered() { Server_SetRotation(GetMouseHitLocation()); - UE_LOG(LogTemp, Warning, TEXT("Skill4 %x"), Value); + UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered")); GetPlayerState()->SetState(ECharacterState::Attack); - GetPlayerState()->SetAttackType(CooldownType::Skill4Started); + GetPlayerState()->SetAttackType(CooldownType::Skill4Triggered); +} + +void ADefaultPlayerController::Skill4Completed() +{ + Server_SetRotation(GetMouseHitLocation()); + + UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed")); + GetPlayerState()->SetState(ECharacterState::Attack); + GetPlayerState()->SetAttackType(CooldownType::Skill4Comlpleted); } void ADefaultPlayerController::RuneSpell1() diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index a510b0b..ae1142e 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -34,7 +34,8 @@ public: void Skill1(); void Skill2(); void Skill3(); - void Skill4(const FInputActionValue& Value); + void Skill4Triggered(); + void Skill4Completed(); void RuneSpell1(); void RuneSpell2(); void Ward(); diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp index 724738c..365a35f 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp @@ -6,7 +6,6 @@ ADefaultPlayerState::ADefaultPlayerState() CharacterBPRef = nullptr;; Team = TeamType::Null; State = ECharacterState::Idle; - InitPlayerStats(); } void ADefaultPlayerState::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const From 64d92be895384d47cc3b966879b2e35ce09cd873 Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sat, 7 Oct 2023 22:26:53 +0900 Subject: [PATCH 03/15] =?UTF-8?q?=EB=A6=AC=EC=95=84=EB=82=98=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=20=EB=AA=A8=EC=85=98=20=EB=B0=8F=20=ED=8C=8C=EC=9A=B4?= =?UTF-8?q?=EB=93=9C=20=EA=B6=81=EA=B7=B9=EA=B8=B0=20=EB=AA=A8=EC=85=98=20?= =?UTF-8?q?=EC=82=BD=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Character/BP_Folder/DefaultClass.uasset | 4 ++-- Content/Character/Lb/Animation/ABP_Lb.uasset | 4 ++-- Content/Character/Lb/Animation/R1_Anim.uasset | 4 ++-- Content/Character/Lb/Animation/R2_Anim.uasset | 4 ++-- .../Riana/Animation/ABP_Riana.uasset | 3 +++ .../Riana/Animation/Skill3_Anim.uasset | 4 ++-- .../Riana/Animation/Skill4_3_Anim.uasset | 4 ++-- Content/Character/Riana/BP_Riana.uasset | 4 ++-- Content/Effect/ETC/Burning.uasset | 4 ++-- .../InputActions/InputMappingContext.uasset | 4 ++-- Content/InputActions/Skill4.uasset | 4 ++-- Content/InputActions/Skill4_End.uasset | 3 +++ Content/Maps/DevMap.umap | 4 ++-- .../Blueprints/Blueprint_CeilingLight.uasset | 4 ++-- .../Materials/M_Basic_Floor.uasset | 4 ++-- .../Materials/M_Radial_Gradient.uasset | 4 ++-- .../Particles/Materials/M_radial_ramp.uasset | 4 ++-- .../Particles/Materials/m_flare_01.uasset | 4 ++-- Source/Promether/AnimNotify/AN_Skill4_End.cpp | 14 +++++++++++ Source/Promether/AnimNotify/AN_Skill4_End.h | 19 +++++++++++++++ Source/Promether/GameModeBase/Deathmatch.cpp | 2 +- .../PlayerGeneric/DefaultPlayerCharacter.cpp | 10 ++++++++ .../PlayerGeneric/DefaultPlayerCharacter.h | 8 +++++++ .../PlayerGeneric/DefaultPlayerController.cpp | 23 +++++++++++++++++++ .../PlayerGeneric/DefaultPlayerController.h | 3 +++ 25 files changed, 116 insertions(+), 33 deletions(-) create mode 100644 Content/Character/Riana/Animation/ABP_Riana.uasset create mode 100644 Content/InputActions/Skill4_End.uasset create mode 100644 Source/Promether/AnimNotify/AN_Skill4_End.cpp create mode 100644 Source/Promether/AnimNotify/AN_Skill4_End.h diff --git a/Content/Character/BP_Folder/DefaultClass.uasset b/Content/Character/BP_Folder/DefaultClass.uasset index 290e04d..070c573 100644 --- a/Content/Character/BP_Folder/DefaultClass.uasset +++ b/Content/Character/BP_Folder/DefaultClass.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5ed77da0ce480dc769b0b85a288efb92533d78c89c87e099f1113df2782f898 -size 18108 +oid sha256:98c8a8eafe4d199b6f8b13e3ff1fc763b75718a83a19879f08ae54d3171e89d0 +size 34772 diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 8700d33..493f3af 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9106395cf5962f94dbfd58c77289cabe04829abd6c6d4e94fd1dc650d77deb29 -size 275233 +oid sha256:bb1f2e4bdb532036b4d1ba7dbf6a4286fd471a53369c1f1eb9f0bb785c8800b6 +size 303416 diff --git a/Content/Character/Lb/Animation/R1_Anim.uasset b/Content/Character/Lb/Animation/R1_Anim.uasset index 4a5eb40..e7f7184 100644 --- a/Content/Character/Lb/Animation/R1_Anim.uasset +++ b/Content/Character/Lb/Animation/R1_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e482c12f9233091ad310daf9432f4773dba20592e67dbb77eb4a93f22bf954a -size 77110 +oid sha256:d71615249a5ae4fa14c8db5e3b419f47f3577ffa83d7d8ac77daacae7c399fcb +size 77129 diff --git a/Content/Character/Lb/Animation/R2_Anim.uasset b/Content/Character/Lb/Animation/R2_Anim.uasset index b86911a..b352c03 100644 --- a/Content/Character/Lb/Animation/R2_Anim.uasset +++ b/Content/Character/Lb/Animation/R2_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c5d110cbc5ae8d4b489b73f7a2b7b955803f0ebc65b45c53054e3777484f8b8 -size 164688 +oid sha256:4cfcd9e3f9cbfa6aaf9114969819ec25b19c43c51c72f741b4f21feaa8d5978e +size 164743 diff --git a/Content/Character/Riana/Animation/ABP_Riana.uasset b/Content/Character/Riana/Animation/ABP_Riana.uasset new file mode 100644 index 0000000..31d9165 --- /dev/null +++ b/Content/Character/Riana/Animation/ABP_Riana.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6ab8c7cedf9b7edff8ac5d728af9495548063b01a935d42c7ac28f59150f09f +size 328801 diff --git a/Content/Character/Riana/Animation/Skill3_Anim.uasset b/Content/Character/Riana/Animation/Skill3_Anim.uasset index 2971305..ef75984 100644 --- a/Content/Character/Riana/Animation/Skill3_Anim.uasset +++ b/Content/Character/Riana/Animation/Skill3_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98351f36274d3fa4d24a4b412190e29f1ed1bdb0f65a0b19c31e752043439aad -size 232728 +oid sha256:d207c80c476fac57686c95dbae7c5ec77bf3d53fe6150ed19246eea65f471ca4 +size 235183 diff --git a/Content/Character/Riana/Animation/Skill4_3_Anim.uasset b/Content/Character/Riana/Animation/Skill4_3_Anim.uasset index 2047ae6..86d2780 100644 --- a/Content/Character/Riana/Animation/Skill4_3_Anim.uasset +++ b/Content/Character/Riana/Animation/Skill4_3_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43c9f5f1437c71a029ee74ea05f46948c12c704f778d1e2f0c4dfe3c13e0dbba -size 300215 +oid sha256:e208e84d3ac53af1e7e784b215e83e8f94c49fa56ec0c9a2c6bbd213d1142300 +size 302627 diff --git a/Content/Character/Riana/BP_Riana.uasset b/Content/Character/Riana/BP_Riana.uasset index 2365802..2e8aa4b 100644 --- a/Content/Character/Riana/BP_Riana.uasset +++ b/Content/Character/Riana/BP_Riana.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bde9cd65e2ab75ed06ae9db07a01ef03cd1ed94e8a9bdbf6402e1e850a20e556 -size 34359 +oid sha256:c21e9b8605595d4c8b890bb9a254fdb13a0571e726e14bbc16afdaf8cf7dee9b +size 34177 diff --git a/Content/Effect/ETC/Burning.uasset b/Content/Effect/ETC/Burning.uasset index 122040d..2f9ce9b 100644 --- a/Content/Effect/ETC/Burning.uasset +++ b/Content/Effect/ETC/Burning.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aae95b8020e46c60b8691e209c9ab55bf9caab64ba46da28e1b6c75476903b1f -size 852156 +oid sha256:17b145213e627593f25ecac880ab195efe963c75e42d22ac120d4bee1545e420 +size 603080 diff --git a/Content/InputActions/InputMappingContext.uasset b/Content/InputActions/InputMappingContext.uasset index 8ecb215..2fd3946 100644 --- a/Content/InputActions/InputMappingContext.uasset +++ b/Content/InputActions/InputMappingContext.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:850f747974f408d1ea8bc0bce5cc3c71a10ea8587d0e14f17afc7da0e3049c7c -size 9369 +oid sha256:35d094b2b806fa5159b55f6d14f03017dfcfe13545af429d379432ec5f02f6f9 +size 10912 diff --git a/Content/InputActions/Skill4.uasset b/Content/InputActions/Skill4.uasset index 1a57b3b..a177354 100644 --- a/Content/InputActions/Skill4.uasset +++ b/Content/InputActions/Skill4.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b53eb34d07639a7c357d1a9dfbf9ccd5e5a2d1dc47bf60f784f98e0f18e9c46 -size 1323 +oid sha256:0f316965e3f12b135169cd83fd7accf644205ab51b48d81efbc93dd401ebd0bd +size 1392 diff --git a/Content/InputActions/Skill4_End.uasset b/Content/InputActions/Skill4_End.uasset new file mode 100644 index 0000000..6bec5f9 --- /dev/null +++ b/Content/InputActions/Skill4_End.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b7cb2a0d4b9554f2e40b924c03423f726bf79276780a1adb8ca4a38138f1857 +size 1343 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 5ffae8b..e58ad2f 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d9a9522dd9b5cb02d50c470bd973be7c84386ed9c61ed9aa6ba548dc683ba0d -size 181517 +oid sha256:c9afef7d4a4148de462e3c3648f0b66eba196b79af30c6f869ff27414ba7d875 +size 181915 diff --git a/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset index c5c3b84..ebdbe1e 100644 --- a/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset +++ b/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331 -size 158206 +oid sha256:e5b331a2fb1da7f9b37c7eee2254836f1eec8e2e41e00838db4a765343755de9 +size 44941 diff --git a/Content/StarterContent/Materials/M_Basic_Floor.uasset b/Content/StarterContent/Materials/M_Basic_Floor.uasset index 07401c9..bbad12e 100644 --- a/Content/StarterContent/Materials/M_Basic_Floor.uasset +++ b/Content/StarterContent/Materials/M_Basic_Floor.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38e9963796183aa39c6cd4219fe60403740c902dadd223b96e37158f5b8e07f8 -size 9515 +oid sha256:5c198493d3a6c0c9dc45fb0e6f964bcb8ec2560507e322ba0fc33ddd7acd4ca4 +size 9609 diff --git a/Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset b/Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset index 96f3272..71f3a68 100644 --- a/Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset +++ b/Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:969f0add70f571adb7e14da5ca542a15955166103efd54168a5e248826564781 -size 10357 +oid sha256:4a2fa64d2953b0d60e01d147b4a139bbf1704b59924ba097a38b735e46a34293 +size 10467 diff --git a/Content/StarterContent/Particles/Materials/M_radial_ramp.uasset b/Content/StarterContent/Particles/Materials/M_radial_ramp.uasset index bc957b9..dbb07b9 100644 --- a/Content/StarterContent/Particles/Materials/M_radial_ramp.uasset +++ b/Content/StarterContent/Particles/Materials/M_radial_ramp.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:880794e3875c4394f93e280b35524a677e72a5a1edb06b03c8a0ae9efc2b51a6 -size 10366 +oid sha256:2ead6fd037a59631d300e27941a8f9a67aae91e306096cded5bd598026c03b7a +size 10471 diff --git a/Content/StarterContent/Particles/Materials/m_flare_01.uasset b/Content/StarterContent/Particles/Materials/m_flare_01.uasset index 4b49de3..6999e57 100644 --- a/Content/StarterContent/Particles/Materials/m_flare_01.uasset +++ b/Content/StarterContent/Particles/Materials/m_flare_01.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57377e5d237609372f0837407d7c9f35a5ba00bf81aa049102d699105af8a025 -size 14010 +oid sha256:4c39c6b073961d3f83eb48231c01a2bc9ca61fca41675eb5ac7ae3eb6ea46cfd +size 14106 diff --git a/Source/Promether/AnimNotify/AN_Skill4_End.cpp b/Source/Promether/AnimNotify/AN_Skill4_End.cpp new file mode 100644 index 0000000..6b1afdc --- /dev/null +++ b/Source/Promether/AnimNotify/AN_Skill4_End.cpp @@ -0,0 +1,14 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "AN_Skill4_End.h" + +#include "../PlayerGeneric/DefaultPlayerCharacter.h" + +void UAN_Skill4_End::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) +{ + ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner(); + if (!MyCharacter) return; + + MyCharacter->Skill4_End(); +} diff --git a/Source/Promether/AnimNotify/AN_Skill4_End.h b/Source/Promether/AnimNotify/AN_Skill4_End.h new file mode 100644 index 0000000..e2750dd --- /dev/null +++ b/Source/Promether/AnimNotify/AN_Skill4_End.h @@ -0,0 +1,19 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Animation/AnimNotifies/AnimNotify.h" +#include "AN_Skill4_End.generated.h" + +/** + * + */ +UCLASS() +class PROMETHER_API UAN_Skill4_End : public UAnimNotify +{ + GENERATED_BODY() + +public: + virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; +}; diff --git a/Source/Promether/GameModeBase/Deathmatch.cpp b/Source/Promether/GameModeBase/Deathmatch.cpp index 8c6ea7e..db8175f 100644 --- a/Source/Promether/GameModeBase/Deathmatch.cpp +++ b/Source/Promether/GameModeBase/Deathmatch.cpp @@ -133,7 +133,7 @@ FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const //DebugPerpose if (Type == CharacterType::Lukriel) { - Type = CharacterType::Allium; + Type = CharacterType::Lb; } if (Team == TeamType::Null) { diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp index 76e1f35..263de6d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp @@ -186,6 +186,16 @@ void ADefaultPlayerCharacter::NetMulticast_Skill4_Implementation() BP_Skill4(); } +void ADefaultPlayerCharacter::Skill4_End_Implementation() +{ + NetMulticast_Skill4_End(); +} + +void ADefaultPlayerCharacter::NetMulticast_Skill4_End_Implementation() +{ + BP_Skill4_End(); +} + void ADefaultPlayerCharacter::Skill5_Implementation() { NetMulticast_Skill5(); diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index 9cfb097..6b9496a 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -65,6 +65,14 @@ public: UFUNCTION(NetMulticast, Reliable) void NetMulticast_Skill4(); + UFUNCTION(BlueprintCallable, Server, Reliable) + void Skill4_End(); + //Override me + UFUNCTION(BlueprintImplementableEvent) + void BP_Skill4_End(); + UFUNCTION(NetMulticast, Reliable) + void NetMulticast_Skill4_End(); + UFUNCTION(BlueprintCallable, Server, Reliable) void Skill5(); //Override me diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 6e6e94b..b1b19e4 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -133,6 +133,7 @@ ADefaultPlayerController::ADefaultPlayerController() IA_SKILL2(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill2.Skill2'")), IA_SKILL3(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill3.Skill3'")), IA_SKILL4(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill4.Skill4'")), + IA_SKILL4_End(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill4_End.Skill4_End'")), IA_RUNESPELL1(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/RuneSpell1.RuneSpell1'")), IA_RUNESPELL2(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/RuneSpell2.RuneSpell2'")), IA_WARD(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Ward.Ward'")), @@ -160,6 +161,11 @@ ADefaultPlayerController::ADefaultPlayerController() UE_LOG(LogTemp, Error, TEXT("IA_ULTIMATESKILL load failed.")); return; } + if (!IA_SKILL4_End.Succeeded()) + { + UE_LOG(LogTemp, Error, TEXT("IA_ULTIMATESKILL load failed.")); + return; + } if (!IA_RUNESPELL1.Succeeded()) { UE_LOG(LogTemp, Error, TEXT("IA_RUNESPELL1 load failed.")); @@ -196,6 +202,7 @@ ADefaultPlayerController::ADefaultPlayerController() Skill2Action = IA_SKILL2.Object; Skill3Action = IA_SKILL3.Object; Skill4Action = IA_SKILL4.Object; + Skill4_EndAction = IA_SKILL4_End.Object; RuneSpell1Action = IA_RUNESPELL1.Object; RuneSpell2Action = IA_RUNESPELL2.Object; WardAction = IA_WARD.Object; @@ -221,6 +228,7 @@ void ADefaultPlayerController::SetupInputComponent() EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2); EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3); EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4); + EnhancedInputComponent->BindAction(Skill4_EndAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4_End); EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1); EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2); EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward); @@ -294,6 +302,21 @@ void ADefaultPlayerController::Skill4() GetPlayerState()->SetAttackType(CooldownType::Skill4Started); } +void ADefaultPlayerController::Skill4_End() +{ + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + + GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation()); + + UE_LOG(LogTemp, Warning, TEXT("Skill4_End")); + GetPlayerState()->SetState(ECharacterState::Attack); + GetPlayerState()->SetAttackType(CooldownType::Skill4Comlpleted); +} + void ADefaultPlayerController::RuneSpell1() { UE_LOG(LogTemp, Warning, TEXT("RuneSpell1")); diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index 22d92c7..149817b 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -35,6 +35,7 @@ public: void Skill2(); void Skill3(); void Skill4(); + void Skill4_End(); void RuneSpell1(); void RuneSpell2(); void Ward(); @@ -71,6 +72,8 @@ private: TSoftObjectPtr Skill3Action; UPROPERTY(EditAnywhere, Category = "Input") TSoftObjectPtr Skill4Action; + UPROPERTY(EditAnywhere, Category = "Input") + TSoftObjectPtr Skill4_EndAction; UPROPERTY(EditAnywhere, Category = "Input") TSoftObjectPtr RuneSpell1Action; UPROPERTY(EditAnywhere, Category = "Input") From 52e4c37ee59f1305d7cb599d11be330b3ad08f4d Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Sun, 8 Oct 2023 04:45:12 +0900 Subject: [PATCH 04/15] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC?= =?UTF-8?q?=20+=20stats=20FName=EA=B5=AC=ED=98=84=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/Animation/ABP_Lb.uasset | 4 +- Content/Character/Lb/Animation/R2_Anim.uasset | 4 +- Content/Character/Lb/BP_Lb.uasset | 4 +- Content/Maps/DevMap.umap | 4 +- .../PlayerGeneric/DefaultPlayerCharacter.cpp | 67 ++---- .../PlayerGeneric/DefaultPlayerCharacter.h | 80 +------ .../PlayerGeneric/DefaultPlayerController.cpp | 220 ++++++++++-------- .../PlayerGeneric/DefaultPlayerState.cpp | 48 +--- .../PlayerGeneric/DefaultPlayerState.h | 31 +-- Source/Promether/PrometherEnum.h | 38 +++ 10 files changed, 217 insertions(+), 283 deletions(-) diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 0a42e01..5b4df98 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e790215f1968518d97a61ff6d8c56f7d14c3c7d7cb481025827daf3c4b0a90c6 -size 290801 +oid sha256:75517bd7de78a30c9720f3cfe1ce0a924b5c0ff83a1f830aa6b98dd6fd9c5a04 +size 310577 diff --git a/Content/Character/Lb/Animation/R2_Anim.uasset b/Content/Character/Lb/Animation/R2_Anim.uasset index b86911a..8a69d0e 100644 --- a/Content/Character/Lb/Animation/R2_Anim.uasset +++ b/Content/Character/Lb/Animation/R2_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c5d110cbc5ae8d4b489b73f7a2b7b955803f0ebc65b45c53054e3777484f8b8 -size 164688 +oid sha256:228c3f0cc7442f470f1f6ecd7ac3e46d058570c339c3ea599db5a9e6e27da282 +size 164747 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index e2d5ea3..0dbe4c5 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44edc4eaf0c0147046acc14266f5165ad830fbb9574d289de136b32cdbc08076 -size 139532 +oid sha256:db33b12578b5bbcc1544836fae0157f4325c361d7d93695a0433d2e36b340805 +size 144292 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 132dd6f..6244900 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:83759f90f993a37a6439fbe14a2bbd7701fee19631dab8a196432ca80a6eef09 -size 181915 +oid sha256:e5d16e9758c041479bd4f6b7e3562a337a11384d9e0dac49b9199c91bc6df50b +size 185559 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp index 76e1f35..1d393db 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp @@ -25,39 +25,18 @@ ADefaultPlayerCharacter::ADefaultPlayerCharacter() Camera = CreateDefaultSubobject(TEXT("Camera")); Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName); - Health = 0.0f; - HPRegeneration = 0.0f; - HealAndShieldpower = 0.0f; - Armor = 0.0f; - MagicResistance = 0.0f; - Tenacity = 0.0f; - SlowRisist = 0.0f; - AttackSpeed = 0.0f; - AttackDamage = 0.0f; - AbilityPower = 0.0f; - CriticalStrikeChance = 0.0f; - CriticalStrikeDamage = 0.0f; - ArmorPenetration = 0.0f; - MagicPenetration = 0.0f; - LifeSteal = 0.0f; - PhysicalVamp = 0.0f; - Omnivamp = 0.0f; - AbilityHaste = 0.0f; - Mana = 0.0f; - ManaRegeneration = 0.0f; - Energy = 0.0f; - EnergyRegeneration = 0.0f; - AttackRange = 0.0f; - MovementSpeed = 0.0f; - GoldGeneration = 0.0f; - AttackDamageGrowth = 0.0f; - AttackSpeedGrowth = 0.0f; - ArmorGrowth = 0.0f; - MagicResistanceGrowth = 0.0f; - HealthGrowth = 0.0f; - HealthRegenerationGrowth = 0.0f; - ManaGrowth = 0.0f; - ManaRegenerationGrowth = 0.0f; + const UEnum* CharStateEnum = FindObject(ANY_PACKAGE, TEXT("EStats"), true); + if (!CharStateEnum) + { + UE_LOG(LogTemp, Error, TEXT("EStats Missing")); + return; + } + + for (uint8 i = 0; i < (uint8)EStats::SIZE; i++) + DefaultStats.Add(*CharStateEnum->GetNameByValue((uint8)i).ToString(), 0.0f); + + for (uint8 i = 0; i < (uint8)CooldownType::SIZE; i++) + CooldownDuration.Add((CooldownType)i, 0.0f); } void ADefaultPlayerCharacter::Tick(float DeltaTime) @@ -104,15 +83,15 @@ float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, str float ADDamageMultiplier = 0; float APDamageMultiplier = 0; - if (MyState->Stats.Armor >= 0) - ADDamageMultiplier = 100 / (100 + MyState->Stats.Armor); + if (MyState->Stats[(uint8)EStats::Armor] >= 0) + ADDamageMultiplier = 100 / (100 + MyState->Stats[(uint8)EStats::Armor]); else - ADDamageMultiplier = 2 - 100 / (100 - MyState->Stats.Armor); + ADDamageMultiplier = 2 - 100 / (100 - MyState->Stats[(uint8)EStats::Armor]); - if (MyState->Stats.MagicResistance >= 0) - APDamageMultiplier = 100 / (100 + MyState->Stats.MagicResistance); + if (MyState->Stats[(uint8)EStats::MagicResistance] >= 0) + APDamageMultiplier = 100 / (100 + MyState->Stats[(uint8)EStats::MagicResistance]); else - APDamageMultiplier = 2 - 100 / (100 - MyState->Stats.MagicResistance); + APDamageMultiplier = 2 - 100 / (100 - MyState->Stats[(uint8)EStats::MagicResistance]); UE_LOG(LogTemp, Warning, TEXT("%s : ADDamageMultiplier : %f CalculatedDamage : %f"), *DamageCauser->GetName(), ADDamageMultiplier, DamageAmount * ADDamageMultiplier); @@ -120,19 +99,19 @@ float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, str if (Cast(DamageEvent.DamageTypeClass->GetDefaultObject())) { - UE_LOG(LogTemp, Warning, TEXT("DamageType : BaseAttack")); + UE_LOG(LogTemp, Warning, TEXT("DamageType : BaseAttack")); - float UpdatedHealth = MyState->Stats.Health - EventInstigatorState->Stats.AttackDamage * ADDamageMultiplier; + float UpdatedHealth = MyState->Stats[(uint8)EStats::Health] - EventInstigatorState->Stats[(uint8)EStats::AttackDamage] * ADDamageMultiplier; if (UpdatedHealth < 0) { - MyState->Stats.Health = 0; + MyState->Stats[(uint8)EStats::Health] = 0; } else { - MyState->Stats.Health = UpdatedHealth; + MyState->Stats[(uint8)EStats::Health] = UpdatedHealth; } - UE_LOG(LogTemp, Warning, TEXT("Current Health : %f"), MyState->Stats.Health); + UE_LOG(LogTemp, Warning, TEXT("Current Health : %f"), MyState->Stats[(uint8)EStats::Health]); } } diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index f7d5601..406f534 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -89,83 +89,11 @@ public: UFUNCTION(NetMulticast, Reliable) void NetMulticast_Skill7(); - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float Health; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float HPRegeneration; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float HealAndShieldpower; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float Armor; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float MagicResistance; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float Tenacity; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive") - float SlowRisist; - - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float AttackSpeed; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float AttackDamage; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float AbilityPower; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float CriticalStrikeChance; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float CriticalStrikeDamage; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float ArmorPenetration; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float MagicPenetration; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float LifeSteal; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float PhysicalVamp; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive") - float Omnivamp; - - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Haste") - float AbilityHaste; - - UPROPERTY(EditAnywhere, Category = "Stats|Utility|Haste") - float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, }; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource") - float Mana; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource") - float ManaRegeneration; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource") - float Energy; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource") - float EnergyRegeneration; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility") - float AttackRange; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility") - float MovementSpeed; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Non-Combat") - float GoldGeneration; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float AttackDamageGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float AttackSpeedGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float ArmorGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float MagicResistanceGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float HealthGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float HealthRegenerationGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float ManaGrowth; - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics") - float ManaRegenerationGrowth; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") + TMap DefaultStats; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") + TMap CooldownDuration; protected: UPROPERTY(EditAnywhere) USpringArmComponent* CameraSpringArm; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index ee3bd3e..5653128 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -18,18 +18,23 @@ void ADefaultPlayerController::BeginPlay() { Super::BeginPlay(); - if (ULocalPlayer* LocalPlayer = Cast(Player)) { - if (UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem()) { - if (!PlayerInputMapping.IsNull()) { - InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0); - } - else { - UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed")); - } - } + ULocalPlayer* LocalPlayer = Cast(Player); + if (!LocalPlayer) return; + UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem(); + if (!InputSystem) return; + ADefaultPlayerCharacter* ControlledPawn = GetPawn(); + if (!ControlledPawn) return; + ADefaultPlayerState* MyPlayerState = GetPlayerState(); + if (!MyPlayerState) return; + if (PlayerInputMapping.IsNull()) + { + UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed")); + return; } + InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0); this->bShowMouseCursor = true; + //MyPlayerState->InitPlayerStats(ControlledPawn->DefaultStats, ControlledPawn->CooldownDuration); } void ADefaultPlayerController::OnPossess(APawn* aPawn) @@ -39,16 +44,15 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn) Server_SpawnPlayerCamera(); AActor *PlayerCamera = GetPlayerState()->GetPlayerCamera(); - if (PlayerCamera) - { - SetViewTarget(PlayerCamera); - - UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState()->GetPlayerCamera()->GetName()); - } - else + if (!PlayerCamera) { UE_LOG(LogTemp, Error, TEXT("GetPlayerCamera Failed.")); + return; } + + SetViewTarget(PlayerCamera); + + UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState()->GetPlayerCamera()->GetName()); } void ADefaultPlayerController::OnUnPossess() @@ -66,48 +70,46 @@ void ADefaultPlayerController::Server_SpawnPlayerCamera_Implementation() UE_LOG(LogTemp, Warning, TEXT("SpawnPlayerCamera")); - if (APawn* MyPawn = GetPawn()) + APawn* MyPawn = GetPawn(); + if (!MyPawn) return; + + FTransform SpawnTransform = FTransform(); + + SpawnTransform.SetLocation(MyPawn->GetActorLocation()); + + OutContextPlayerCamera = GetWorld()->SpawnActor(ADefaultPlayerCamera::StaticClass(), SpawnTransform, SpawnInfo); + if (!OutContextPlayerCamera) { - FTransform SpawnTransform = FTransform(); - - SpawnTransform.SetLocation(MyPawn->GetActorLocation()); - - OutContextPlayerCamera = GetWorld()->SpawnActor(ADefaultPlayerCamera::StaticClass(), SpawnTransform, SpawnInfo); - if (OutContextPlayerCamera) - { - GetPlayerState()->SetPlayerCamera(OutContextPlayerCamera); - OutContextPlayerCamera->AttachToActor(GetPawn(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, EAttachmentRule::KeepWorld, false)); - - UE_LOG(LogTemp, Warning, TEXT("SetPlayerCamera Success : %s, %d"), *GetPlayerState()->GetPlayerCamera()->GetName(), GetPlayerState()->GetPlayerCamera()); - } - else - { - UE_LOG(LogTemp, Error, TEXT("Camera Spawn Failed.")); - } + UE_LOG(LogTemp, Error, TEXT("Camera Spawn Failed.")); + return; } + + GetPlayerState()->SetPlayerCamera(OutContextPlayerCamera); + OutContextPlayerCamera->AttachToActor(GetPawn(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, EAttachmentRule::KeepWorld, false)); + + UE_LOG(LogTemp, Warning, TEXT("SetPlayerCamera Success : %s, %d"), *GetPlayerState()->GetPlayerCamera()->GetName(), GetPlayerState()->GetPlayerCamera()); } void ADefaultPlayerController::SetACharacterOutlineColor(ACharacter* Target, bool Visible) { - if (!HasAuthority()) + if (HasAuthority()) return; + + ADefaultPlayerState* State = Target->GetPlayerState(); + if (!State) { - if (ADefaultPlayerState* State = Target->GetPlayerState()) - { - if (State->GetTeam() == GetPlayerState()->GetTeam()) - { - Target->GetMesh()->SetRenderCustomDepth(Visible); - Target->GetMesh()->CustomDepthStencilValue = 1; - } - else - { - Target->GetMesh()->SetRenderCustomDepth(Visible); - Target->GetMesh()->CustomDepthStencilValue = 2; - } - } - else - { - UE_LOG(LogTemp, Error, TEXT("GetPlayerState Failed")); - } + UE_LOG(LogTemp, Error, TEXT("GetPlayerState Failed")); + return; + } + + if (State->GetTeam() == GetPlayerState()->GetTeam()) + { + Target->GetMesh()->SetRenderCustomDepth(Visible); + Target->GetMesh()->CustomDepthStencilValue = 1; + } + else + { + Target->GetMesh()->SetRenderCustomDepth(Visible); + Target->GetMesh()->CustomDepthStencilValue = 2; } } @@ -215,20 +217,20 @@ void ADefaultPlayerController::SetupInputComponent() { Super::SetupInputComponent(); - if (UEnhancedInputComponent* EnhancedInputComponent = Cast(InputComponent)) - { - EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1); - EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2); - EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3); - EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4Triggered); - EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4Completed); - EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1); - EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2); - EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward); - EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb); - EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect); - EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Move); - } + UEnhancedInputComponent* EnhancedInputComponent = Cast(InputComponent); + if (!EnhancedInputComponent) return; + + EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1); + EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2); + EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3); + EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4Triggered); + EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4Completed); + EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1); + EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2); + EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward); + EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb); + EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect); + EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Move); } void ADefaultPlayerController::Skill1() @@ -236,6 +238,12 @@ void ADefaultPlayerController::Skill1() //if (!(GetPlayerState()->Stats.Mana >= 100)) // return; + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill1")); @@ -245,6 +253,12 @@ void ADefaultPlayerController::Skill1() void ADefaultPlayerController::Skill2() { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill2")); @@ -254,6 +268,12 @@ void ADefaultPlayerController::Skill2() void ADefaultPlayerController::Skill3() { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill3")); @@ -263,6 +283,12 @@ void ADefaultPlayerController::Skill3() void ADefaultPlayerController::Skill4Triggered() { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered")); @@ -272,6 +298,12 @@ void ADefaultPlayerController::Skill4Triggered() void ADefaultPlayerController::Skill4Completed() { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + SimpleMoveToLocation(this, Location); + this->MoveToLocation(Location); + Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed")); @@ -316,11 +348,11 @@ void ADefaultPlayerController::ObjectSelect() GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult); - if (ACharacter* HitObject = Cast(HitResult.GetActor())) - { - UE_LOG(LogTemp, Warning, TEXT("%s"), *HitObject->GetName()); - SetACharacterOutlineColor(HitObject, true); - } + ACharacter* HitObject = Cast(HitResult.GetActor()); + if (!HitObject) return; + + UE_LOG(LogTemp, Warning, TEXT("%s"), *HitObject->GetName()); + SetACharacterOutlineColor(HitObject, true); } void ADefaultPlayerController::Move() @@ -337,9 +369,6 @@ void ADefaultPlayerController::Multicast_SetRotation_Implementation(FVector Mous FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); - GetPawn()->SetActorRotation((MouseHitLocation - Location).Rotation()); } @@ -367,22 +396,21 @@ FVector ADefaultPlayerController::GetMouseHitLocation() DrawDebugLine(GetWorld(), HitResult.Location, Destination, FColor::Emerald, false, 1, 0, 1); const UWorld* CurrentWorld = GetWorld(); - if (CurrentWorld) - { - FHitResult CollisionCheck; + if (!CurrentWorld) return Destination; - FCollisionQueryParams CollisionParams; - CollisionParams.AddIgnoredActor(GetPawn()); + FHitResult CollisionCheck; - FVector Start = HitResult.Location; - FVector End = Destination; + FCollisionQueryParams CollisionParams; + CollisionParams.AddIgnoredActor(GetPawn()); - if (CurrentWorld->LineTraceSingleByChannel(CollisionCheck, Start, End, ECC_Visibility, CollisionParams)) - { - DrawDebugLine(CurrentWorld, Start, End, FColor::Red, false, 1.5, 0, 2); - Destination = HitResult.Location; - } - } + FVector Start = HitResult.Location; + FVector End = Destination; + + if (!CurrentWorld->LineTraceSingleByChannel(CollisionCheck, Start, End, ECC_Visibility, CollisionParams)) + return Destination; + + DrawDebugLine(CurrentWorld, Start, End, FColor::Red, false, 1.5, 0, 2); + Destination = HitResult.Location; return Destination; } @@ -467,18 +495,18 @@ void ADefaultPlayerController::SimpleMoveToLocation(AController* Controller, con void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& MovementResult) { - if (MovementResult.IsSuccess()) + if (!MovementResult.IsSuccess()) return; + + if (!GPlayInEditorID) { - if (!GPlayInEditorID) - { - UE_LOG(LogTemp, Warning, TEXT("Server MoveCompleted")); - } - else - { - UE_LOG(LogTemp, Warning, TEXT("Client%d MoveCompleted"), GPlayInEditorID); - } - GetPlayerState()->SetState(ECharacterState::Idle); + UE_LOG(LogTemp, Warning, TEXT("Server MoveCompleted")); } + else + { + UE_LOG(LogTemp, Warning, TEXT("Client%d MoveCompleted"), GPlayInEditorID); + } + + GetPlayerState()->SetState(ECharacterState::Idle); } void ADefaultPlayerController::Attack() diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp index 365a35f..c7e2448 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp @@ -26,46 +26,11 @@ void ADefaultPlayerState::GetLifetimeReplicatedProps(TArray& DOREPLIFETIME(ADefaultPlayerState, PlayerCamera); } -void ADefaultPlayerState::InitPlayerStats() +void ADefaultPlayerState::InitPlayerStats_Implementation(const TArray& StatsValue, const TArray& CooldownDurationValue) { - ADefaultPlayerCharacter* Initializer = Cast(CharacterBPRef); - - Stats.Health = Initializer->Health; - Stats.HPRegeneration = Initializer->HPRegeneration; - Stats.HealAndShieldpower = Initializer->HealAndShieldpower; - Stats.Armor = Initializer->Armor; - Stats.MagicResistance = Initializer->MagicResistance; - Stats.Tenacity = Initializer->Tenacity; - Stats.SlowRisist = Initializer->SlowRisist; - Stats.AttackSpeed = Initializer->AttackSpeed; - Stats.AttackDamage = Initializer->AttackDamage; - Stats.AbilityPower = Initializer->AbilityPower; - Stats.CriticalStrikeChance = Initializer->CriticalStrikeChance; - Stats.CriticalStrikeDamage = Initializer->CriticalStrikeDamage; - Stats.ArmorPenetration = Initializer->ArmorPenetration; - Stats.MagicPenetration = Initializer->MagicPenetration; - Stats.LifeSteal = Initializer->LifeSteal; - Stats.PhysicalVamp = Initializer->PhysicalVamp; - Stats.Omnivamp = Initializer->Omnivamp; - Stats.AbilityHaste = Initializer->AbilityHaste; - - SetMultipleCooldownDuration(Initializer->CooldownDuration); - - Stats.Mana = Initializer->Mana; - Stats.ManaRegeneration = Initializer->ManaRegeneration; - Stats.Energy = Initializer->Energy; - Stats.EnergyRegeneration = Initializer->EnergyRegeneration; - Stats.AttackRange = Initializer->AttackRange; - Stats.MovementSpeed = Initializer->MovementSpeed; - Stats.GoldGeneration = Initializer->GoldGeneration; - Stats.AttackDamageGrowth = Initializer->AttackDamageGrowth; - Stats.AttackSpeedGrowth = Initializer->AttackSpeedGrowth; - Stats.ArmorGrowth = Initializer->ArmorGrowth; - Stats.MagicResistanceGrowth = Initializer->MagicResistanceGrowth; - Stats.HealthGrowth = Initializer->HealthGrowth; - Stats.HealthRegenerationGrowth = Initializer->HealthRegenerationGrowth; - Stats.ManaGrowth = Initializer->ManaGrowth; - Stats.ManaRegenerationGrowth = Initializer->ManaRegenerationGrowth; + MaxStats.Append(StatsValue); + Stats.Append(StatsValue); + CooldownDuration.Append(CooldownDurationValue); } void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value) @@ -92,8 +57,3 @@ int32 ADefaultPlayerState::GetCharacterLevel() const { return int32(); } - -void ADefaultPlayerState::SetMultipleCooldownDuration(const float* Value) -{ - std::memcpy(&CooldownDuration, Value, sizeof(float) * (uint8)CooldownType::SIZE); -} diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.h b/Source/Promether/PlayerGeneric/DefaultPlayerState.h index 7b64d67..d566af0 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.h @@ -21,7 +21,8 @@ public: ADefaultPlayerState(); void GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const override; - void InitPlayerStats(); + UFUNCTION(Server, Reliable) + void InitPlayerStats(const TArray& StatsValue, const TArray& CooldownDurationValue); void SetCharacterBPRef(UClass* Value) { CharacterBPRef = Value; } UClass* GetCharacterBPRef() const { return CharacterBPRef; } @@ -34,10 +35,11 @@ public: void SetPlayerCamera(AActor* Actor) { PlayerCamera = Actor; } AActor* GetPlayerCamera() const { return PlayerCamera; } - UFUNCTION(BlueprintCallable) - void SetCooldownDuration(CooldownType Key, float Value) { CooldownDuration[(uint8)Key] = Value; } - UFUNCTION(BlueprintCallable) - float GetCooldownDuration(CooldownType Key) const { return CooldownDuration[(uint8)Key]; } + //fix later + //UFUNCTION(BlueprintCallable) + //void SetCooldownDuration(CooldownType Key, float Value) { CooldownDuration[(uint8)Key] = Value; } + //UFUNCTION(BlueprintCallable) + //float GetCooldownDuration(CooldownType Key) const { return CooldownDuration[(uint8)Key]; } //Execute on server UFUNCTION(BlueprintCallable, Server, Reliable) @@ -57,14 +59,16 @@ public: UFUNCTION(BlueprintCallable) int32 GetCharacterLevel() const; - - //Should be ONLY executed on server!! - void SetMultipleCooldownDuration(const float* Value) ; - UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite) - FDefaultStats Stats; - UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite) - FDefaultStats MaxStats; + UPROPERTY(Replicated, Transient, EditAnywhere, BlueprintReadWrite) + TArray Stats; + UPROPERTY(Replicated, Transient, EditAnywhere, BlueprintReadWrite) + TArray MaxStats; + + UPROPERTY(Replicated, Transient, BlueprintReadWrite) + TArray CooldownDuration; + UPROPERTY(Replicated, Transient, BlueprintReadWrite) + TArray MaxCooldownDuration; private: UPROPERTY(Replicated, Transient) @@ -72,9 +76,6 @@ private: UPROPERTY(Replicated, Transient) TeamType Team; - UPROPERTY(Replicated, Transient) - float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, }; - UPROPERTY(Replicated, Transient) ECharacterState State; UPROPERTY(Replicated, Transient) diff --git a/Source/Promether/PrometherEnum.h b/Source/Promether/PrometherEnum.h index 1fb193f..a2bdd20 100644 --- a/Source/Promether/PrometherEnum.h +++ b/Source/Promether/PrometherEnum.h @@ -91,3 +91,41 @@ struct FUniqueObjectID int32 RandomUniqueNumber; }; +UENUM(BlueprintType) +enum class EStats : uint8 +{ + Health, + HPRegeneration, + HealAndShieldpower, + Armor, + MagicResistance, + Tenacity, + SlowRisist, + AttackSpeed, + AttackDamage, + AbilityPower, + CriticalStrikeChance, + CriticalStrikeDamage, + ArmorPenetration, + MagicPenetration, + LifeSteal, + PhysicalVamp, + Omnivamp, + AbilityHaste, + Mana, + ManaRegeneration, + Energy, + EnergyRegeneration, + AttackRange, + MovementSpeed, + GoldGeneration, + AttackDamageGrowth, + AttackSpeedGrowth, + ArmorGrowth, + MagicResistanceGrowth, + HealthGrowth, + HealthRegenerationGrowth, + ManaGrowth, + ManaRegenerationGrowth, + SIZE +}; \ No newline at end of file From 69852b9541c192c2d096d6de7f47a5da349cdded Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Sun, 8 Oct 2023 05:12:55 +0900 Subject: [PATCH 05/15] =?UTF-8?q?=EC=8A=A4=ED=83=AF=EC=9D=B4=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=9C=20stats=EC=99=80=20=EB=8F=99=EA=B8=B0=ED=99=94?= =?UTF-8?q?=EB=90=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Character/BP_Folder/DefaultClass.uasset | 4 ++-- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Maps/DevMap.umap | 4 ++-- .../PlayerGeneric/DefaultPlayerCharacter.cpp | 11 ++-------- .../PlayerGeneric/DefaultPlayerCharacter.h | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 21 ++++++++++++++----- .../PlayerGeneric/DefaultPlayerState.cpp | 7 +++++++ 7 files changed, 32 insertions(+), 21 deletions(-) diff --git a/Content/Character/BP_Folder/DefaultClass.uasset b/Content/Character/BP_Folder/DefaultClass.uasset index 290e04d..53535d1 100644 --- a/Content/Character/BP_Folder/DefaultClass.uasset +++ b/Content/Character/BP_Folder/DefaultClass.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5ed77da0ce480dc769b0b85a288efb92533d78c89c87e099f1113df2782f898 -size 18108 +oid sha256:25cdab2bc7f4974adf1757b7cb5f49a1992c2138539efa84aa91d1ed1e1f402d +size 12818 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 0dbe4c5..d2c87a9 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db33b12578b5bbcc1544836fae0157f4325c361d7d93695a0433d2e36b340805 -size 144292 +oid sha256:63d3f35b7f189a662443e477ef6bd4c89528cdb668328ba598fbc880c77a7ca6 +size 140743 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 6244900..8d398db 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5d16e9758c041479bd4f6b7e3562a337a11384d9e0dac49b9199c91bc6df50b -size 185559 +oid sha256:b3391b09e0fe249eefa23c146088dae77f17837c30ce0cb5facd2f9c910a5f98 +size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp index 1d393db..65f655d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp @@ -24,16 +24,9 @@ ADefaultPlayerCharacter::ADefaultPlayerCharacter() Camera = CreateDefaultSubobject(TEXT("Camera")); Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName); - - const UEnum* CharStateEnum = FindObject(ANY_PACKAGE, TEXT("EStats"), true); - if (!CharStateEnum) - { - UE_LOG(LogTemp, Error, TEXT("EStats Missing")); - return; - } - + for (uint8 i = 0; i < (uint8)EStats::SIZE; i++) - DefaultStats.Add(*CharStateEnum->GetNameByValue((uint8)i).ToString(), 0.0f); + DefaultStats.Add((EStats)i, 0.0f); for (uint8 i = 0; i < (uint8)CooldownType::SIZE; i++) CooldownDuration.Add((CooldownType)i, 0.0f); diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index 406f534..84a3dc8 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -90,7 +90,7 @@ public: void NetMulticast_Skill7(); UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") - TMap DefaultStats; + TMap DefaultStats; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") TMap CooldownDuration; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 5653128..c34de91 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -20,12 +20,10 @@ void ADefaultPlayerController::BeginPlay() ULocalPlayer* LocalPlayer = Cast(Player); if (!LocalPlayer) return; + UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem(); if (!InputSystem) return; - ADefaultPlayerCharacter* ControlledPawn = GetPawn(); - if (!ControlledPawn) return; - ADefaultPlayerState* MyPlayerState = GetPlayerState(); - if (!MyPlayerState) return; + if (PlayerInputMapping.IsNull()) { UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed")); @@ -34,7 +32,6 @@ void ADefaultPlayerController::BeginPlay() InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0); this->bShowMouseCursor = true; - //MyPlayerState->InitPlayerStats(ControlledPawn->DefaultStats, ControlledPawn->CooldownDuration); } void ADefaultPlayerController::OnPossess(APawn* aPawn) @@ -53,6 +50,20 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn) SetViewTarget(PlayerCamera); UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState()->GetPlayerCamera()->GetName()); + + ADefaultPlayerCharacter* ControlledPawn = GetPawn(); + if (!ControlledPawn) return; + + ADefaultPlayerState* MyPlayerState = GetPlayerState(); + if (!MyPlayerState) return; + + TArray DefaultStatsValue; + TArray CooldownDurationValue; + + ControlledPawn->DefaultStats.GenerateValueArray(DefaultStatsValue); + ControlledPawn->CooldownDuration.GenerateValueArray(CooldownDurationValue); + + MyPlayerState->InitPlayerStats(DefaultStatsValue, CooldownDurationValue); } void ADefaultPlayerController::OnUnPossess() diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp index c7e2448..1159af6 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.cpp @@ -31,6 +31,13 @@ void ADefaultPlayerState::InitPlayerStats_Implementation(const TArray& St MaxStats.Append(StatsValue); Stats.Append(StatsValue); CooldownDuration.Append(CooldownDurationValue); + MaxCooldownDuration.Append(CooldownDurationValue); + + + for (float Value : StatsValue) + { + UE_LOG(LogTemp, Warning, TEXT("Values: %f"), Value); + } } void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value) From ae124e49f057b9ebe63bfc2b9c7b50e0f565bdf6 Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Sun, 8 Oct 2023 18:59:33 +0900 Subject: [PATCH 06/15] =?UTF-8?q?=ED=83=80=EC=9D=B4=EB=A8=BC=20=EA=B8=B0?= =?UTF-8?q?=EB=B0=98=20=EB=95=9C=EB=B9=B5=20=EC=BD=94=EB=94=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/BP_Lb.uasset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index d2c87a9..d792c0a 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63d3f35b7f189a662443e477ef6bd4c89528cdb668328ba598fbc880c77a7ca6 -size 140743 +oid sha256:61108077174897cc7abf4008171a6ab3d96f6cf80dde836ebb645cdcedd3378e +size 179764 From 3615e7be0acb1ddac39304b74b511cdb685152e9 Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Tue, 10 Oct 2023 23:35:41 +0900 Subject: [PATCH 07/15] =?UTF-8?q?=EB=A8=B8=EC=A7=80=20=EC=99=84=EB=A3=8C,?= =?UTF-8?q?=20=EB=8D=B0=EB=AF=B8=EC=A7=80=20=EA=B4=80=EB=A0=A8=20=EA=B0=84?= =?UTF-8?q?=EB=8B=A8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Allium/BP_Allium.uasset | 4 +- .../BP_DefaultPlayerCharacter.uasset | 3 ++ Content/Character/Lb/Animation/ABP_Lb.uasset | 4 +- Content/Character/Lb/BP_Lb.uasset | 4 +- Content/Character/Lb/LB_Bolla_Throw.uasset | 4 +- Content/Maps/DevMap.umap | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 42 ++++++++++++++----- .../PlayerGeneric/DefaultPlayerController.h | 5 +++ 8 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset diff --git a/Content/Character/Allium/BP_Allium.uasset b/Content/Character/Allium/BP_Allium.uasset index 8af03e5..9122094 100644 --- a/Content/Character/Allium/BP_Allium.uasset +++ b/Content/Character/Allium/BP_Allium.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fcb784f0cb24a64149aec72d17cb4247ead004a0b33e9a3b4e35b5df4979ad06 -size 136354 +oid sha256:f2170a5f1bef59fe201c622cace975291f9352897ca17b186c05cacd41e8709a +size 130328 diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset new file mode 100644 index 0000000..c02ef1e --- /dev/null +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:724dccb566fa7e134412ca13ea575939f52f9cd2298c3e6443adce92ec831911 +size 60911 diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 493f3af..7f8c503 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb1f2e4bdb532036b4d1ba7dbf6a4286fd471a53369c1f1eb9f0bb785c8800b6 -size 303416 +oid sha256:60a91a0ac26b8c4b06b74e612bbf7601fd7ed5d0a3a0fe32db06ba96a33c4da9 +size 313020 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index d792c0a..857598b 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61108077174897cc7abf4008171a6ab3d96f6cf80dde836ebb645cdcedd3378e -size 179764 +oid sha256:af8ae252c9b8cd47cafe54310152a948f91a319908354e647ac01ff55eda5742 +size 191286 diff --git a/Content/Character/Lb/LB_Bolla_Throw.uasset b/Content/Character/Lb/LB_Bolla_Throw.uasset index 8328842..3b7df4e 100644 --- a/Content/Character/Lb/LB_Bolla_Throw.uasset +++ b/Content/Character/Lb/LB_Bolla_Throw.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fb47290031b302262dc6571fe6ff9eaf99f70ad2af232f572e3f711235e94727 -size 31160 +oid sha256:aa351e49248ba6f14c769b7aca332443bbcaaf6e57cbc0fd4da26c1dad4b6d41 +size 55944 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 8d398db..35371fd 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3391b09e0fe249eefa23c146088dae77f17837c30ce0cb5facd2f9c910a5f98 +oid sha256:c9889eedfae41ca443b755b6901e83b884f1af7e3cbc98899ebd58f8b4bf40d2 size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index c34de91..7bebdfe 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -252,9 +252,10 @@ void ADefaultPlayerController::Skill1() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill1")); @@ -267,9 +268,10 @@ void ADefaultPlayerController::Skill2() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill2")); @@ -282,9 +284,10 @@ void ADefaultPlayerController::Skill3() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill3")); @@ -297,9 +300,10 @@ void ADefaultPlayerController::Skill4Triggered() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered")); @@ -312,9 +316,10 @@ void ADefaultPlayerController::Skill4Completed() FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; - SimpleMoveToLocation(this, Location); - this->MoveToLocation(Location); + Server_StopMove(); + Multicast_StopMove(); + Multicast_SetRotation(GetMouseHitLocation()); Server_SetRotation(GetMouseHitLocation()); UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed")); @@ -388,6 +393,23 @@ void ADefaultPlayerController::Server_SetRotation_Implementation(FVector MouseHi Multicast_SetRotation(MouseHitLocation); } +void ADefaultPlayerController::Server_StopMove_Implementation() +{ + Multicast_StopMove(); +} + +void ADefaultPlayerController::Multicast_StopMove_Implementation() +{ + UPathFollowingComponent* PFollowComp = this->FindComponentByClass(); + if (!PFollowComp) return; + + PFollowComp->OnRequestFinished.Clear(); + + PFollowComp->RequestMoveWithImmediateFinish(EPathFollowingResult::Success); + + PFollowComp->OnRequestFinished.AddUObject(this, &ADefaultPlayerController::OnMoveCompleted); +} + FVector ADefaultPlayerController::GetMouseHitLocation() { FHitResult HitResult; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index ae1142e..2c90b72 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -46,6 +46,11 @@ public: UFUNCTION(Server, Reliable) void MoveToLocation(FVector Location); + UFUNCTION(Server, Reliable) + void Server_StopMove(); + UFUNCTION(NetMulticast, Reliable) + void Multicast_StopMove(); + UFUNCTION(NetMulticast, Reliable) void Multicast_SetRotation(FVector MouseHitLocation); From 2a22ff140f3b35cb3d15e5228dde942d34877384 Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Tue, 10 Oct 2023 23:38:27 +0900 Subject: [PATCH 08/15] =?UTF-8?q?0=EB=8E=80=EC=9D=80=20=EB=8D=B0=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=EA=B0=80=20=EC=95=84=EB=8B=88=EC=97=90=EC=9A=94!!!!!!?= =?UTF-8?q?!!!!!!!!!!!!!!!!!!!!!!!!!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/LB_Bolla_Throw.uasset | 4 ++-- Content/Maps/DevMap.umap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content/Character/Lb/LB_Bolla_Throw.uasset b/Content/Character/Lb/LB_Bolla_Throw.uasset index 3b7df4e..5c9a0b1 100644 --- a/Content/Character/Lb/LB_Bolla_Throw.uasset +++ b/Content/Character/Lb/LB_Bolla_Throw.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa351e49248ba6f14c769b7aca332443bbcaaf6e57cbc0fd4da26c1dad4b6d41 -size 55944 +oid sha256:14b0cf71f6be95f47f6fe4dfc9149221039cda6b7d8ba19687996dc47c53f124 +size 56163 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 35371fd..a24a0e4 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9889eedfae41ca443b755b6901e83b884f1af7e3cbc98899ebd58f8b4bf40d2 +oid sha256:f46b903c2ef351cfb9a072b4eaba94a919ffce5ca3af282703d387f15a4e5b2e size 115131 From fe6d559697e2aa6834aa5b2bd2ef31d701cfcf8d Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Tue, 10 Oct 2023 23:59:57 +0900 Subject: [PATCH 09/15] =?UTF-8?q?=EC=BD=94=EC=8A=A4=ED=8A=B8=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Maps/DevMap.umap | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 22 +++++++++---------- Source/Promether/PrometherEnum.h | 6 ++++- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 857598b..1418d02 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af8ae252c9b8cd47cafe54310152a948f91a319908354e647ac01ff55eda5742 -size 191286 +oid sha256:a1a85727e67bcf386aefe203a239fe15a2715da7498c43d19da5c02ed20ed9db +size 191159 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index a24a0e4..ca710ed 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f46b903c2ef351cfb9a072b4eaba94a919ffce5ca3af282703d387f15a4e5b2e +oid sha256:e2f707b55fdf84bad9d63f0e665ec79a1bb0a76bffda43d7908d8db6b26ee688 size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 7bebdfe..78a29f8 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -246,8 +246,8 @@ void ADefaultPlayerController::SetupInputComponent() void ADefaultPlayerController::Skill1() { - //if (!(GetPlayerState()->Stats.Mana >= 100)) - // return; + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill1Cost])) + return; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -265,6 +265,9 @@ void ADefaultPlayerController::Skill1() void ADefaultPlayerController::Skill2() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill2Cost])) + return; + FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -281,6 +284,9 @@ void ADefaultPlayerController::Skill2() void ADefaultPlayerController::Skill3() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill3Cost])) + return; + FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -297,6 +303,9 @@ void ADefaultPlayerController::Skill3() void ADefaultPlayerController::Skill4Triggered() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->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()->SetState(ECharacterState::Attack); GetPlayerState()->SetAttackType(CooldownType::Skill4Comlpleted); diff --git a/Source/Promether/PrometherEnum.h b/Source/Promether/PrometherEnum.h index a2bdd20..e2d31e4 100644 --- a/Source/Promether/PrometherEnum.h +++ b/Source/Promether/PrometherEnum.h @@ -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 }; \ No newline at end of file From d3025bfbfa671c820a10429944d91a4a1a1950ce Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sun, 15 Oct 2023 00:35:56 +0900 Subject: [PATCH 10/15] =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EA=B3=B5=EA=B2=A9?= =?UTF-8?q?=20=EC=95=8C=EA=B3=A0=EB=A6=AC=EC=A6=98=20=EC=84=A4=EA=B3=84?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Lb/Animation/Treasure_Attack1_Anim.uasset | 4 +- Content/Character/Lb/BP_Lb.uasset | 4 +- .../InputActions/InputMappingContext.uasset | 2 +- Content/InputActions/ObjectSelect.uasset | 2 +- Content/Maps/DevMap.umap | 2 +- .../Architecture/Floor_400x400.uasset | 4 +- .../Blueprints/Blueprint_CeilingLight.uasset | 4 +- .../PlayerGeneric/DefaultPlayerController.cpp | 56 +++++++++++++++++-- 8 files changed, 63 insertions(+), 15 deletions(-) diff --git a/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset b/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset index 5499d72..8db8167 100644 --- a/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset +++ b/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2470baf2b6f18679fe64504da91f899cb59e252f14a1bee3fd81d96928c960a6 -size 140654 +oid sha256:20ed827aa687771ca741b63e5234e8853d4689ee0f85662dafca9f658bd0d057 +size 143142 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 1418d02..9dc7bd5 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1a85727e67bcf386aefe203a239fe15a2715da7498c43d19da5c02ed20ed9db -size 191159 +oid sha256:05afb776797fc130d45f19c0344c12ff41743d0454e5cbbe9f4564192c2e8744 +size 192437 diff --git a/Content/InputActions/InputMappingContext.uasset b/Content/InputActions/InputMappingContext.uasset index 2fd3946..0b5099e 100644 --- a/Content/InputActions/InputMappingContext.uasset +++ b/Content/InputActions/InputMappingContext.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35d094b2b806fa5159b55f6d14f03017dfcfe13545af429d379432ec5f02f6f9 +oid sha256:211d2c26d7a5c53a14ae7319d4c76917bfbd6f94785c13468fb2e6857a6a1b19 size 10912 diff --git a/Content/InputActions/ObjectSelect.uasset b/Content/InputActions/ObjectSelect.uasset index 6230f41..bc8e2a1 100644 --- a/Content/InputActions/ObjectSelect.uasset +++ b/Content/InputActions/ObjectSelect.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20963a7668875eb3c81a12a801f23d92900ce274714c38cf692094a1cc97fe27 +oid sha256:b5da50944fc17aa1359bcdfd5e1c254d978392c5b73edcb118e130271b6d484c size 1353 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index ca710ed..fdfef24 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2f707b55fdf84bad9d63f0e665ec79a1bb0a76bffda43d7908d8db6b26ee688 +oid sha256:a39f01744e181c37a957d0135e6ca1682f3ee37c198524c096b26f66a57a37e7 size 115131 diff --git a/Content/StarterContent/Architecture/Floor_400x400.uasset b/Content/StarterContent/Architecture/Floor_400x400.uasset index c2a34af..5b5f5cf 100644 --- a/Content/StarterContent/Architecture/Floor_400x400.uasset +++ b/Content/StarterContent/Architecture/Floor_400x400.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c0ecf0ac0702cc2bd355ec050232a61c49e10f102448efbeb735a51824adef6 -size 14948 +oid sha256:7bba03e7a10feb5689290b2523db0b25c646e9d01607f07bac3ac8c898d9d3f8 +size 15287 diff --git a/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset b/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset index ebdbe1e..c5c3b84 100644 --- a/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset +++ b/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e5b331a2fb1da7f9b37c7eee2254836f1eec8e2e41e00838db4a765343755de9 -size 44941 +oid sha256:4a60a29ad596546d481e43dfb8698842a78cc07f4a4b1000fa397cfba4e72331 +size 158206 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 78a29f8..3f71e35 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -371,15 +371,63 @@ void ADefaultPlayerController::ObjectSelect() SetACharacterOutlineColor(HitObject, true); } + void ADefaultPlayerController::Move() { - FVector Destination = GetMouseHitLocation(); + FHitResult HitResult; + TArray> ObjectTypes; + ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldStatic)); + ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn)); - GetPlayerState()->SetState(ECharacterState::Moving); - SimpleMoveToLocation(this, Destination); - this->MoveToLocation(Destination); + GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult); + ACharacter* HitObject = Cast(HitResult.GetActor()); + + if (HitObject != nullptr) + { + float MinDistance = 100000.0f; // ÃÖ¼Ò °Å¸® + + FVector Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ + + if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance) + { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + Server_StopMove(); + Multicast_StopMove(); + + Multicast_SetRotation(GetMouseHitLocation()); + Server_SetRotation(GetMouseHitLocation()); + + GetPlayerState()->SetState(ECharacterState::Attack); + GetPlayerState()->SetAttackType(CooldownType::Attack); + } + else + { + GetPlayerState()->SetState(ECharacterState::Moving); + SimpleMoveToLocation(this, Destination); + this->MoveToLocation(Destination); + } + + + + } + else + { + HitObject = nullptr; + FVector Destination = GetMouseHitLocation(); + GetPlayerState()->SetState(ECharacterState::Moving); + SimpleMoveToLocation(this, Destination); + this->MoveToLocation(Destination); + } + } + + + + + void ADefaultPlayerController::Multicast_SetRotation_Implementation(FVector MouseHitLocation) { FVector Location = GetPawn()->GetActorLocation(); From a201059fbb16606e575a29f393a6436f3154ddf9 Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sun, 15 Oct 2023 01:23:33 +0900 Subject: [PATCH 11/15] =?UTF-8?q?=ED=8F=89=ED=83=80=20=EC=95=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=EC=A6=98=2022?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/Animation/ABP_Lb.uasset | 4 +- Content/Maps/DevMap.umap | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 61 +++++++++---------- .../PlayerGeneric/DefaultPlayerController.h | 4 +- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/Content/Character/Lb/Animation/ABP_Lb.uasset b/Content/Character/Lb/Animation/ABP_Lb.uasset index 7f8c503..5a81b45 100644 --- a/Content/Character/Lb/Animation/ABP_Lb.uasset +++ b/Content/Character/Lb/Animation/ABP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60a91a0ac26b8c4b06b74e612bbf7601fd7ed5d0a3a0fe32db06ba96a33c4da9 -size 313020 +oid sha256:55f905bcd305f8c23ee484fa11fcae581e830cb01132382ee18d7aba8035c2b0 +size 337395 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index fdfef24..8f15050 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a39f01744e181c37a957d0135e6ca1682f3ee37c198524c096b26f66a57a37e7 +oid sha256:1e54e50e895cbaf9d2d2520224d0026554f3d36beb6e9cfa534a86d1aaca3cf9 size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 3f71e35..b7c32a1 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -384,33 +384,7 @@ void ADefaultPlayerController::Move() if (HitObject != nullptr) { - float MinDistance = 100000.0f; // ÃÖ¼Ò °Å¸® - - FVector Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ - - if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance) - { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; - - Server_StopMove(); - Multicast_StopMove(); - - Multicast_SetRotation(GetMouseHitLocation()); - Server_SetRotation(GetMouseHitLocation()); - - GetPlayerState()->SetState(ECharacterState::Attack); - GetPlayerState()->SetAttackType(CooldownType::Attack); - } - else - { - GetPlayerState()->SetState(ECharacterState::Moving); - SimpleMoveToLocation(this, Destination); - this->MoveToLocation(Destination); - } - - - + Attack(HitObject); } else { @@ -590,11 +564,36 @@ void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPa GetPlayerState()->SetState(ECharacterState::Idle); } -void ADefaultPlayerController::Attack() +void ADefaultPlayerController::Attack(ACharacter* HitObject) { - UE_LOG(LogTemp, Warning, TEXT("Attack")); - GetPlayerState()->SetState(ECharacterState::Attack); - GetPlayerState()->SetAttackType(CooldownType::Attack); + //¹Ýº¹¹®À¸·Î ¸¸µé¾î »ç¿ëÇϱâ + float MinDistance = 1000.0f; // ÃÖ¼Ò °Å¸®(Àӽà : ÃßÈÄ¿¡ ij¸¯ÅÍ »çÁ¤°Å¸® ¹Þ¾Æ¿Ã°Í) + + FVector Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ + + if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance) + { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; + + Server_StopMove(); + Multicast_StopMove(); + + Multicast_SetRotation(GetMouseHitLocation()); + Server_SetRotation(GetMouseHitLocation()); + + UE_LOG(LogTemp, Warning, TEXT("Attack")); + GetPlayerState()->SetState(ECharacterState::Attack); + GetPlayerState()->SetAttackType(CooldownType::Attack); + } + else + { + GetPlayerState()->SetState(ECharacterState::Moving); + SimpleMoveToLocation(this, Destination); + this->MoveToLocation(Destination); + } + + } void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location) diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.h b/Source/Promether/PlayerGeneric/DefaultPlayerController.h index 2c90b72..166d56d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.h @@ -64,7 +64,9 @@ public: void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult &MovementResult); - void Attack(); + + + void Attack(ACharacter* HitObject); UPROPERTY(BlueprintReadWrite) float MouseClickInterval; From f9d36a28240daccd20283f1584db360881e720af Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sun, 15 Oct 2023 19:25:18 +0900 Subject: [PATCH 12/15] =?UTF-8?q?=ED=8F=89=ED=83=80=EC=95=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=EC=A6=98=20=EC=B5=9C=EC=A2=85(=EB=B0=98=EB=B3=B5=20?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=ED=81=B4=EB=A7=8C=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=ED=95=98=EB=A9=B4=20=EB=81=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BP_DefaultPlayerCharacter.uasset | 4 +- .../Lb/Animation/Treasure_Attack1_Anim.uasset | 4 +- Content/Character/Lb/BP_Lb.uasset | 4 +- Content/Maps/DevMap.umap | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 76 +++++++++++++------ 5 files changed, 58 insertions(+), 32 deletions(-) diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset index c02ef1e..409de82 100644 --- a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:724dccb566fa7e134412ca13ea575939f52f9cd2298c3e6443adce92ec831911 -size 60911 +oid sha256:4488490e103b01aef77a20f21e31c8306966f10455e91460afe87da337718754 +size 59842 diff --git a/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset b/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset index 8db8167..f757a61 100644 --- a/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset +++ b/Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20ed827aa687771ca741b63e5234e8853d4689ee0f85662dafca9f658bd0d057 -size 143142 +oid sha256:a91864ef5ec5faced4df2eb509c700788d5893295d91f60e27cf67eeb7d09fe0 +size 144533 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 9dc7bd5..344aeaa 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:05afb776797fc130d45f19c0344c12ff41743d0454e5cbbe9f4564192c2e8744 -size 192437 +oid sha256:f2e72d6cf335fed09d9c92fff5a648a1b5ef2debabe84ec73f2063b63407d390 +size 220304 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index 8f15050..c1797b4 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e54e50e895cbaf9d2d2520224d0026554f3d36beb6e9cfa534a86d1aaca3cf9 +oid sha256:cf14774080aa2fa29eb41d8f11b933d1eeacafb59d20e81c8828918efe7f799f size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index b7c32a1..111935d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -249,6 +249,7 @@ void ADefaultPlayerController::Skill1() if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill1Cost])) return; + ACharacter* HitObject = nullptr; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -268,6 +269,7 @@ void ADefaultPlayerController::Skill2() if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill2Cost])) return; + ACharacter* HitObject = nullptr; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -287,6 +289,7 @@ void ADefaultPlayerController::Skill3() if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill3Cost])) return; + ACharacter* HitObject = nullptr; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -306,6 +309,7 @@ void ADefaultPlayerController::Skill4Triggered() if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill4Cost])) return; + ACharacter* HitObject = nullptr; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -379,12 +383,13 @@ void ADefaultPlayerController::Move() ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldStatic)); ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn)); - GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult); - ACharacter* HitObject = Cast(HitResult.GetActor()); + GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult); + ACharacter* HitObject = Cast(HitResult.GetActor()); //¿ÀºêÁ§Æ®¸¦ °¡Á®¿Í HitCharactor¿¡ ÀúÀå<<ÃßÈÄ Àû ij¸¯ÅÍÀ϶§¸¸ ÀúÀåÀ¸·Î º¯°æÇؾßÇÔ - if (HitObject != nullptr) + if (HitObject != nullptr) //Áö±ÝÀº HitObject°¡ nullÀÌ ¾Æ´Ò °æ¿ì Attack()À» ½ÇÇàÇÏ´Â ÄÚµåÁö¸¸, HitObject°¡ Àû ij¸¯ÅÍÀÏ ¶§ ½ÇÇàÀ¸·Î º¯°æÇؾßÇÔ { - Attack(HitObject); + + Attack(HitObject); //HitObject¸¦ ´ë»óÀ¸·Î Attack ½ÇÇà } else { @@ -566,34 +571,55 @@ void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPa void ADefaultPlayerController::Attack(ACharacter* HitObject) { - //¹Ýº¹¹®À¸·Î ¸¸µé¾î »ç¿ëÇϱâ - float MinDistance = 1000.0f; // ÃÖ¼Ò °Å¸®(Àӽà : ÃßÈÄ¿¡ ij¸¯ÅÍ »çÁ¤°Å¸® ¹Þ¾Æ¿Ã°Í) + + float MinDistance = GetPlayerState()->Stats[(uint8)EStats:: AttackRange]; + FVector Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ + if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance) + { + if ((GetPlayerState()->CooldownDuration[(uint8)CooldownType::Attack] == 0)) + { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; - FVector Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ + Server_StopMove(); + Multicast_StopMove(); - if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance) - { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; + Multicast_SetRotation(GetMouseHitLocation()); + Server_SetRotation(GetMouseHitLocation()); - Server_StopMove(); - Multicast_StopMove(); + UE_LOG(LogTemp, Warning, TEXT("Attack")); + GetPlayerState()->SetState(ECharacterState::Attack); + GetPlayerState()->SetAttackType(CooldownType::Attack); + } + else + { + FVector Location = GetPawn()->GetActorLocation(); + Location.Z = 0; - Multicast_SetRotation(GetMouseHitLocation()); - Server_SetRotation(GetMouseHitLocation()); + Server_StopMove(); + Multicast_StopMove(); - UE_LOG(LogTemp, Warning, TEXT("Attack")); - GetPlayerState()->SetState(ECharacterState::Attack); - GetPlayerState()->SetAttackType(CooldownType::Attack); - } - else - { - GetPlayerState()->SetState(ECharacterState::Moving); - SimpleMoveToLocation(this, Destination); - this->MoveToLocation(Destination); - } + Multicast_SetRotation(GetMouseHitLocation()); + Server_SetRotation(GetMouseHitLocation()); + UE_LOG(LogTemp, Warning, TEXT("Attack")); + GetPlayerState()->SetState(ECharacterState::Idle); + GetPlayerState()->SetAttackType(CooldownType::Attack); + } + } + else + { + GetPlayerState()->SetState(ECharacterState::Moving); + SimpleMoveToLocation(this, Destination); + + Destination = HitObject->GetActorLocation(); // HitObjectÀÇ À§Ä¡¸¦ ¸ñÀûÁö·Î ¼³Á¤ + this->MoveToLocation(Destination); + + + } + + } void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location) From 1e14efdea46fc6a1e5db65dcfe6b162ce84f0fe2 Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sun, 15 Oct 2023 23:06:32 +0900 Subject: [PATCH 13/15] =?UTF-8?q?=ED=8F=89=ED=83=80=20=EC=95=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=EC=A6=98=20=EC=B5=9C=EC=A2=85(duration=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94/=EC=A0=81=20=EC=BA=90=EB=A6=AD=ED=84=B0?= =?UTF-8?q?=EB=A7=8C=20=EC=A7=80=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=ED=95=84=EC=9A=94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BP_Folder/BP_DefaultPlayerCharacter.uasset | 4 ++-- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Effect/LB/Arrow/Arrow_Flash.uasset | 4 ++-- Content/UI/NameBar_UI/NameBar_UI.uasset | 3 +++ .../PlayerGeneric/DefaultPlayerCharacter.cpp | 3 +++ .../PlayerGeneric/DefaultPlayerCharacter.h | 4 ++++ .../PlayerGeneric/DefaultPlayerController.cpp | 2 ++ .../PlayerGeneric/DefaultPlayerState.h | 2 +- Source/Promether/PrometherEnum.h | 17 +++++++++++++++++ 9 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 Content/UI/NameBar_UI/NameBar_UI.uasset diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset index 409de82..36ccc48 100644 --- a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4488490e103b01aef77a20f21e31c8306966f10455e91460afe87da337718754 -size 59842 +oid sha256:af298be22c28c813f796ea6c7d191ba99009b83199d669ea3ee99b313596f4d2 +size 105820 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 344aeaa..5e1649d 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2e72d6cf335fed09d9c92fff5a648a1b5ef2debabe84ec73f2063b63407d390 -size 220304 +oid sha256:76280f59d033687f4420a54ddbef2b6a35cea9770d03d4c816844a8029751237 +size 235213 diff --git a/Content/Effect/LB/Arrow/Arrow_Flash.uasset b/Content/Effect/LB/Arrow/Arrow_Flash.uasset index 3bc7ca9..6fc4b39 100644 --- a/Content/Effect/LB/Arrow/Arrow_Flash.uasset +++ b/Content/Effect/LB/Arrow/Arrow_Flash.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:073ecf1386b299aba1eea78a1405a835471356d9a0bb4106425c140e4dba7319 -size 893601 +oid sha256:7036040b1e2cba274c767596dc14415dd1a2c06a807a85081475c8b14935617b +size 892797 diff --git a/Content/UI/NameBar_UI/NameBar_UI.uasset b/Content/UI/NameBar_UI/NameBar_UI.uasset new file mode 100644 index 0000000..15d93bd --- /dev/null +++ b/Content/UI/NameBar_UI/NameBar_UI.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d320189d8221430088b1955a74d9d7c2a7484bd9ce2ff00a82ee4e124a256e4f +size 76073 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp index ceb44e9..59d6e45 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp @@ -30,6 +30,9 @@ 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) diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index 7f8387d..29e86a5 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -102,6 +102,10 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") TMap CooldownDuration; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") + TMap DefaultMaxStats; + protected: UPROPERTY(EditAnywhere) USpringArmComponent* CameraSpringArm; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 111935d..e54564a 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -59,9 +59,11 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn) TArray DefaultStatsValue; TArray CooldownDurationValue; + TArray DefaultMaxStatsValue; ControlledPawn->DefaultStats.GenerateValueArray(DefaultStatsValue); ControlledPawn->CooldownDuration.GenerateValueArray(CooldownDurationValue); + ControlledPawn->DefaultMaxStats.GenerateValueArray(DefaultMaxStatsValue); MyPlayerState->InitPlayerStats(DefaultStatsValue, CooldownDurationValue); } diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.h b/Source/Promether/PlayerGeneric/DefaultPlayerState.h index d566af0..357bfe4 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.h @@ -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; diff --git a/Source/Promether/PrometherEnum.h b/Source/Promether/PrometherEnum.h index e2d31e4..c85d2cd 100644 --- a/Source/Promether/PrometherEnum.h +++ b/Source/Promether/PrometherEnum.h @@ -131,5 +131,22 @@ 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 }; \ No newline at end of file From 0fc3bf0ec98ee6df62e0d5c68d881bb70150d460 Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Sun, 15 Oct 2023 23:11:06 +0900 Subject: [PATCH 14/15] =?UTF-8?q?=ED=8F=89=ED=83=80=20=EC=95=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=EC=A6=98=20=EC=B5=9C=EC=A2=85(duration=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94/=EC=A0=81=20=EC=BA=90=EB=A6=AD=ED=84=B0?= =?UTF-8?q?=EB=A7=8C=20=EC=A7=80=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=ED=95=84=EC=9A=94)=20=EC=BA=90=EB=A6=AD=ED=84=B0?= =?UTF-8?q?=20=EC=B2=B4=EB=A0=A5=EB=B0=94=20UI=20=EC=B6=94=EA=B0=80(?= =?UTF-8?q?=EC=8B=A4=EC=8B=9C=EA=B0=84=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EA=B5=AC=ED=98=84=20=EC=8B=A4=ED=8C=A8)=20MaxStats?= =?UTF-8?q?=20Enum=20=EC=B6=94=EA=B0=80,=20stats=EC=97=90=20=EA=B2=BD?= =?UTF-8?q?=ED=97=98=EC=B9=98=20=EA=B4=80=EB=A0=A8=20=EC=8A=A4=ED=83=AF=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BP_Folder/BP_DefaultPlayerCharacter.uasset | 4 ++-- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/UI/NameBar_UI/NameBar_UI.uasset | 3 --- .../PlayerGeneric/DefaultPlayerCharacter.cpp | 3 --- .../PlayerGeneric/DefaultPlayerCharacter.h | 4 ---- .../PlayerGeneric/DefaultPlayerController.cpp | 2 -- .../PlayerGeneric/DefaultPlayerState.h | 2 +- Source/Promether/PrometherEnum.h | 17 ----------------- 8 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 Content/UI/NameBar_UI/NameBar_UI.uasset diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset index 36ccc48..409de82 100644 --- a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af298be22c28c813f796ea6c7d191ba99009b83199d669ea3ee99b313596f4d2 -size 105820 +oid sha256:4488490e103b01aef77a20f21e31c8306966f10455e91460afe87da337718754 +size 59842 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 5e1649d..344aeaa 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76280f59d033687f4420a54ddbef2b6a35cea9770d03d4c816844a8029751237 -size 235213 +oid sha256:f2e72d6cf335fed09d9c92fff5a648a1b5ef2debabe84ec73f2063b63407d390 +size 220304 diff --git a/Content/UI/NameBar_UI/NameBar_UI.uasset b/Content/UI/NameBar_UI/NameBar_UI.uasset deleted file mode 100644 index 15d93bd..0000000 --- a/Content/UI/NameBar_UI/NameBar_UI.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d320189d8221430088b1955a74d9d7c2a7484bd9ce2ff00a82ee4e124a256e4f -size 76073 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp index 59d6e45..ceb44e9 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.cpp @@ -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) diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h index 29e86a5..7f8387d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerCharacter.h @@ -102,10 +102,6 @@ public: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") TMap CooldownDuration; - - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats") - TMap DefaultMaxStats; - protected: UPROPERTY(EditAnywhere) USpringArmComponent* CameraSpringArm; diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index e54564a..111935d 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -59,11 +59,9 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn) TArray DefaultStatsValue; TArray CooldownDurationValue; - TArray DefaultMaxStatsValue; ControlledPawn->DefaultStats.GenerateValueArray(DefaultStatsValue); ControlledPawn->CooldownDuration.GenerateValueArray(CooldownDurationValue); - ControlledPawn->DefaultMaxStats.GenerateValueArray(DefaultMaxStatsValue); MyPlayerState->InitPlayerStats(DefaultStatsValue, CooldownDurationValue); } diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerState.h b/Source/Promether/PlayerGeneric/DefaultPlayerState.h index 357bfe4..d566af0 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerState.h +++ b/Source/Promether/PlayerGeneric/DefaultPlayerState.h @@ -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; diff --git a/Source/Promether/PrometherEnum.h b/Source/Promether/PrometherEnum.h index c85d2cd..e2d31e4 100644 --- a/Source/Promether/PrometherEnum.h +++ b/Source/Promether/PrometherEnum.h @@ -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 }; \ No newline at end of file From 5ad7df473ba2bf64dee4365c09a60bc1d3999112 Mon Sep 17 00:00:00 2001 From: SJW1024 Date: Mon, 16 Oct 2023 02:51:26 +0900 Subject: [PATCH 15/15] =?UTF-8?q?=EB=B2=84=ED=94=84=20=EC=8B=9C=EC=8A=A4?= =?UTF-8?q?=ED=85=9C=20=EC=83=98=ED=94=8C=20-=EC=99=84-?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset | 4 ++-- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Character/Lb/EskillBuff.uasset | 3 +++ Content/Character/Lb/LB_Bolla_Throw.uasset | 4 ++-- Content/Effect/LB/LB_Sprint.uasset | 4 ++-- Content/Maps/DevMap.umap | 4 ++-- Content/UI/NameBar_UI/Hp_UI.uasset | 3 +++ Content/UI/NameBar_UI/NameBar_UI.uasset | 3 +++ 8 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 Content/Character/Lb/EskillBuff.uasset create mode 100644 Content/UI/NameBar_UI/Hp_UI.uasset create mode 100644 Content/UI/NameBar_UI/NameBar_UI.uasset diff --git a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset index 409de82..67fc4cc 100644 --- a/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset +++ b/Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4488490e103b01aef77a20f21e31c8306966f10455e91460afe87da337718754 -size 59842 +oid sha256:593ac8b14902ff3cf56e93f7dfb7415ab8cf10bd717378d6a04eff2beb3921d0 +size 106010 diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 344aeaa..9f47318 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2e72d6cf335fed09d9c92fff5a648a1b5ef2debabe84ec73f2063b63407d390 -size 220304 +oid sha256:5c39784d45dfac8cce880c52bff49faa73e19f7cbd349d6cb9aa0e22c5bd34f6 +size 233790 diff --git a/Content/Character/Lb/EskillBuff.uasset b/Content/Character/Lb/EskillBuff.uasset new file mode 100644 index 0000000..31e306e --- /dev/null +++ b/Content/Character/Lb/EskillBuff.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9628fbbcc216c910586edbfe2ebb76fc2a99e98ea91c55602d72811081609fd6 +size 100232 diff --git a/Content/Character/Lb/LB_Bolla_Throw.uasset b/Content/Character/Lb/LB_Bolla_Throw.uasset index 5c9a0b1..ea761fe 100644 --- a/Content/Character/Lb/LB_Bolla_Throw.uasset +++ b/Content/Character/Lb/LB_Bolla_Throw.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14b0cf71f6be95f47f6fe4dfc9149221039cda6b7d8ba19687996dc47c53f124 -size 56163 +oid sha256:ac51d277a931a1f4d37e796a821e86e3d5fc0f31f4f1b6e4a08b84afe3989a50 +size 55765 diff --git a/Content/Effect/LB/LB_Sprint.uasset b/Content/Effect/LB/LB_Sprint.uasset index 5247f7e..8a690d2 100644 --- a/Content/Effect/LB/LB_Sprint.uasset +++ b/Content/Effect/LB/LB_Sprint.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a03fac58192b79035bf6dc47c592021b9fa68891259c05f342c7f076b6471555 -size 3192528 +oid sha256:63b2b3c0efc3d57966767c13b7437660cdd128ae2148fe0fef2e918fadab6abe +size 3347189 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index c1797b4..1138483 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf14774080aa2fa29eb41d8f11b933d1eeacafb59d20e81c8828918efe7f799f -size 115131 +oid sha256:0aab3dc572a4f35b10e6ea9713e874853d7d1b897d93d43ccafb30cf975b9b37 +size 115802 diff --git a/Content/UI/NameBar_UI/Hp_UI.uasset b/Content/UI/NameBar_UI/Hp_UI.uasset new file mode 100644 index 0000000..e6f88ce --- /dev/null +++ b/Content/UI/NameBar_UI/Hp_UI.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e6ecc3639214822da96a4b9d2f29be315e6d9e364219f7694e2c7b7b18d5d0d +size 10744 diff --git a/Content/UI/NameBar_UI/NameBar_UI.uasset b/Content/UI/NameBar_UI/NameBar_UI.uasset new file mode 100644 index 0000000..15fde60 --- /dev/null +++ b/Content/UI/NameBar_UI/NameBar_UI.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd86d0f18bc22c27040bb40d268b9d83d502a7885dfc02fceaf79bdf8f28bf7 +size 76313