From 1af7482513928340c57f9e121d98a66195607f35 Mon Sep 17 00:00:00 2001 From: "PCYPC\\pcy35" Date: Mon, 13 Nov 2023 21:06:59 +0900 Subject: [PATCH] =?UTF-8?q?[=EB=B0=95=EC=B9=98=EC=98=81]=20Blocking=20?= =?UTF-8?q?=EC=82=AC=EC=A0=84=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Input/Actions/IA_Block.uasset | Bin 0 -> 1361 bytes Content/CombatSystem/Input/IMC_Default.uasset | Bin 21693 -> 22353 bytes Source/D1/AI/BossEnemy.cpp | 2 +- Source/D1/AI/CombatAIController.cpp | 2 +- Source/D1/AI/GruntlingEnemy.cpp | 2 +- Source/D1/AI/HeavyMobEnemy.cpp | 2 +- Source/D1/AI/MobEnemy.cpp | 2 +- Source/D1/Actor/BaseShield.cpp | 5 +++ Source/D1/Actor/BaseShield.h | 17 +++++++++ Source/D1/Actor/BaseWeapon.cpp | 2 +- Source/D1/Animation/CombatAnimInstance.cpp | 2 +- Source/D1/CombatPlayerCharacter.cpp | 33 +++++++++++++++++- Source/D1/CombatPlayerCharacter.h | 32 ++++++++++------- Source/D1/Components/CombatComponent.cpp | 11 +++++- Source/D1/Components/CombatComponent.h | 16 +++++++-- 15 files changed, 105 insertions(+), 23 deletions(-) create mode 100644 Content/CombatSystem/Input/Actions/IA_Block.uasset create mode 100644 Source/D1/Actor/BaseShield.cpp create mode 100644 Source/D1/Actor/BaseShield.h diff --git a/Content/CombatSystem/Input/Actions/IA_Block.uasset b/Content/CombatSystem/Input/Actions/IA_Block.uasset new file mode 100644 index 0000000000000000000000000000000000000000..e8db4a70cd46f84d62165e96789a513c74086edd GIT binary patch literal 1361 zcmX@utTpe)|Ns9Jm>C$jm>3v70%;In1md?D8=ky$n(~GFmf<4D-EMjsK(Pxf3=CR8 zTHie}H&x#`KQ}3{B)GD;BsEvxGq0euMBg#FBr`v+Sl`nz-YF+PIUA^!fq@%{^Fc-e zK_$=@MIdeH;_B?;V<BWbEW*YUym?!bZ|q7pyvuRf1b*neLWz%LFRxQ!U|+D zGB_OSVH5)Lw6#NBO|^qkb5awFQ*}-CjKJ~?3~RqN;gAPv0)uzmA@e~DF`&a_Ss`LD z5*VWYK|uwwQxQoH#PrM0OJ(@Ne3Vxf$O%YH&Q45E^~q08%*m`u1cjX+Fl37h5|dLI zgi0zqNDJ&Rwl!TMKx6fTlZ!G7N`Mhmlp5-vl$DxX!tldW*G>#c&NVM1F)uka1srb- zSJ$0>!v>Uf&PgmTW+*AIn8*p_!DCUrOxB$TBmjzJNE|Z=NhI)q6#1r>B)TM)Br-f{ z*fN;|C;;^oL$P~@r~rZwS2tH@Nh&lFfuRine}N$e(u)qz)%^jgV@Fp6V&pcDs9@eDwtP|O19K^NnK8U#u) zj!^a;B=eEYgG$3GbhF?RSQsF4&?6Ehrk?^s=m^wekYW@`C7=K-ZK0$eJ>-M|@&m{} zVTn1VsUejGsSKc)b;{2NX0kl6?S8k+tk4Y13%CZLI61k p6@iKgmOuxAh2!*ZOB?j8k6Z-#Ne0b^vU?VRET{Hs8bHNC>H++j4EX>6 literal 0 HcmV?d00001 diff --git a/Content/CombatSystem/Input/IMC_Default.uasset b/Content/CombatSystem/Input/IMC_Default.uasset index 7e0d22646d07a93278023aba8385dc808b8ec4ef..9480ed8d2ffc22b8a30e227b779e6eeb42987058 100644 GIT binary patch delta 3332 zcmah~TWl0n7(P?z>ULY`y6kor*~`$@U1*omc6WQ>Vt1iwLrY6ryXDe$%R&LQwqA-) zVq$oxHWEvIeJ~M-CMGo^rfz(|NHOT6G2%-fXc4@kP%U@?jS2o|XHI8!=FIjaXU^sO z{{R2}|ID1Z@Sbq_oG`I5*DDfI3f4mZLxhm!uULLQEj zHk^AYOh~{d^;#VNO*9;TVeWG5wEgqqcV>pJeKz?1gBNyu+B!W}G1E}(!E3_T5`kycshUU~c#b=kSdFNm~pksFA#bCI7B*~LYELZpL> z{D?>=7x@7Z2N(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f{Zj@{cEkkG(T{Pn@U!0dIug Ad;kCd diff --git a/Source/D1/AI/BossEnemy.cpp b/Source/D1/AI/BossEnemy.cpp index 75d552af..6dae1b2f 100644 --- a/Source/D1/AI/BossEnemy.cpp +++ b/Source/D1/AI/BossEnemy.cpp @@ -46,7 +46,7 @@ ABossEnemy::ABossEnemy() //Setting CombatComponent //Setting others is Parents - CombatComponent->OnCombatToggled.AddUObject(this, &ABossEnemy::OnCombatToggled); + CombatComponent->OnCombatToggled.BindUObject(this, &ABossEnemy::OnCombatToggled); } void ABossEnemy::BeginPlay() diff --git a/Source/D1/AI/CombatAIController.cpp b/Source/D1/AI/CombatAIController.cpp index 0ecd75a5..0ad601fe 100644 --- a/Source/D1/AI/CombatAIController.cpp +++ b/Source/D1/AI/CombatAIController.cpp @@ -45,7 +45,7 @@ void ACombatAIController::OnPossess(APawn* InPawn) MasterAI = AIpawn; UCombatComponent* combatComponent = MasterAI->GetComponentByClass(); - combatComponent->OnCombatToggled.AddUObject(this, &ACombatAIController::OnCombatToggle); + combatComponent->OnCombatToggled.BindUObject(this, &ACombatAIController::OnCombatToggle); RunBehaviorTree(MasterAI->GetBeHaviorTree()); diff --git a/Source/D1/AI/GruntlingEnemy.cpp b/Source/D1/AI/GruntlingEnemy.cpp index 9ef06868..1169983e 100644 --- a/Source/D1/AI/GruntlingEnemy.cpp +++ b/Source/D1/AI/GruntlingEnemy.cpp @@ -44,7 +44,7 @@ AGruntlingEnemy::AGruntlingEnemy() //Setting CombatComponent //Setting others is Parents - CombatComponent->OnCombatToggled.AddUObject(this, &AGruntlingEnemy::OnCombatToggled); + CombatComponent->OnCombatToggled.BindUObject(this, &AGruntlingEnemy::OnCombatToggled); } void AGruntlingEnemy::BeginPlay() diff --git a/Source/D1/AI/HeavyMobEnemy.cpp b/Source/D1/AI/HeavyMobEnemy.cpp index 868ebc70..5f70c8aa 100644 --- a/Source/D1/AI/HeavyMobEnemy.cpp +++ b/Source/D1/AI/HeavyMobEnemy.cpp @@ -44,7 +44,7 @@ AHeavyMobEnemy::AHeavyMobEnemy() //Setting CombatComponent //Setting others is Parents - CombatComponent->OnCombatToggled.AddUObject(this, &AHeavyMobEnemy::OnCombatToggled); + CombatComponent->OnCombatToggled.BindUObject(this, &AHeavyMobEnemy::OnCombatToggled); } void AHeavyMobEnemy::BeginPlay() diff --git a/Source/D1/AI/MobEnemy.cpp b/Source/D1/AI/MobEnemy.cpp index 2278e8b7..faea9711 100644 --- a/Source/D1/AI/MobEnemy.cpp +++ b/Source/D1/AI/MobEnemy.cpp @@ -38,7 +38,7 @@ AMobEnemy::AMobEnemy() //Setting CombatComponent //Setting others is Parents - CombatComponent->OnCombatToggled.AddUObject(this, &AMobEnemy::OnCombatToggled); + CombatComponent->OnCombatToggled.BindUObject(this, &AMobEnemy::OnCombatToggled); } void AMobEnemy::BeginPlay() diff --git a/Source/D1/Actor/BaseShield.cpp b/Source/D1/Actor/BaseShield.cpp new file mode 100644 index 00000000..7414d334 --- /dev/null +++ b/Source/D1/Actor/BaseShield.cpp @@ -0,0 +1,5 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Actor/BaseShield.h" + diff --git a/Source/D1/Actor/BaseShield.h b/Source/D1/Actor/BaseShield.h new file mode 100644 index 00000000..3895a216 --- /dev/null +++ b/Source/D1/Actor/BaseShield.h @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Actor/BaseWeapon.h" +#include "BaseShield.generated.h" + +/** + * + */ +UCLASS() +class D1_API ABaseShield : public ABaseWeapon +{ + GENERATED_BODY() + +}; diff --git a/Source/D1/Actor/BaseWeapon.cpp b/Source/D1/Actor/BaseWeapon.cpp index 0d6cd9b8..4839c578 100644 --- a/Source/D1/Actor/BaseWeapon.cpp +++ b/Source/D1/Actor/BaseWeapon.cpp @@ -51,7 +51,7 @@ void ABaseWeapon::OnEquipped() if (!owner) return; CombatComponent = owner->GetComponentByClass(); - CombatComponent->OnCombatToggled.AddUObject(this, &ABaseWeapon::ToggleWeaponCombat); + CombatComponent->OnCombatToggled.BindUObject(this, &ABaseWeapon::ToggleWeaponCombat); OwnerStateManager = owner->GetComponentByClass(); diff --git a/Source/D1/Animation/CombatAnimInstance.cpp b/Source/D1/Animation/CombatAnimInstance.cpp index eff29d5f..40d96355 100644 --- a/Source/D1/Animation/CombatAnimInstance.cpp +++ b/Source/D1/Animation/CombatAnimInstance.cpp @@ -20,7 +20,7 @@ void UCombatAnimInstance::NativeInitializeAnimation() UCombatComponent* CombatComponent = Character->GetComponentByClass(); ensure(CombatComponent); if(IsValid(CombatComponent)) - CombatComponent->OnCombatToggled.AddUObject(this, &UCombatAnimInstance::UpdateCombatEnabled); + CombatComponent->OnCombatToggled.BindUObject(this, &UCombatAnimInstance::UpdateCombatEnabled); } } diff --git a/Source/D1/CombatPlayerCharacter.cpp b/Source/D1/CombatPlayerCharacter.cpp index 39f0645d..99f7fe80 100644 --- a/Source/D1/CombatPlayerCharacter.cpp +++ b/Source/D1/CombatPlayerCharacter.cpp @@ -69,7 +69,7 @@ ACombatPlayerCharacter::ACombatPlayerCharacter() // Setting CombatComponent CombatComponent = CreateDefaultSubobject(TEXT("CombatComponent")); - CombatComponent->OnCombatToggled.AddUObject(this, &ACombatPlayerCharacter::CharacterCombatToggled); + CombatComponent->OnCombatToggled.BindUObject(this, &ACombatPlayerCharacter::CharacterCombatToggled); // Setting StateManagerComponent StateManagerComponent = CreateDefaultSubobject(TEXT("StateManagerComponent")); @@ -246,6 +246,9 @@ void ACombatPlayerCharacter::SetupPlayerInputComponent(class UInputComponent* Pl //ToggleLockOn EnhancedInputComponent->BindAction(ToggleLockOnAction, ETriggerEvent::Started, this, &ACombatPlayerCharacter::ToggleLockOn); + + //Block + EnhancedInputComponent->BindAction(ToggleLockOnAction, ETriggerEvent::Started, this, &ACombatPlayerCharacter::ToggleLockOn); } } @@ -533,6 +536,18 @@ void ACombatPlayerCharacter::ToggleLockOn(const FInputActionValue& Value) TargetingComponent->ToggleLockOn(); } +void ACombatPlayerCharacter::Blocking(const FInputActionValue& Value) +{ + if(CanPerformBlock()) + { + CombatComponent->SetBlockingState(true); + } + else + { + CombatComponent->SetBlockingState(false); + } +} + void ACombatPlayerCharacter::CharacterStateBegin(FGameplayTag CharState) { if (FGameplayTag::EmptyTag == CharState) @@ -918,6 +933,22 @@ bool ACombatPlayerCharacter::CanPerformSprint() return (FMath::IsNearlyEqual(GetVelocity().Length(), 0.f)) == false; } +bool ACombatPlayerCharacter::CanPerformBlock() +{ + bool ReturnValue = true; + + FGameplayTagContainer inputContainer; + inputContainer.AddTag(FCombatGameplayTags::Get().Character_State_Attacking); + inputContainer.AddTag(FCombatGameplayTags::Get().Character_State_Dodging); + inputContainer.AddTag(FCombatGameplayTags::Get().Character_State_Dead); + inputContainer.AddTag(FCombatGameplayTags::Get().Character_State_Disable); + inputContainer.AddTag(FCombatGameplayTags::Get().Character_State_GeneralActionState); + + ReturnValue &= !StateManagerComponent->IsCurrentStateEqualToAny(inputContainer); + + return ReturnValue; +} + FGameplayTag ACombatPlayerCharacter::GetDesiredAttackType() { if (GetCharacterMovement()->IsFalling()) diff --git a/Source/D1/CombatPlayerCharacter.h b/Source/D1/CombatPlayerCharacter.h index ee1c508b..3d7b111b 100644 --- a/Source/D1/CombatPlayerCharacter.h +++ b/Source/D1/CombatPlayerCharacter.h @@ -16,6 +16,9 @@ #include "CombatPlayerCharacter.generated.h" +class UInputMappingContext; +class UInputAction; + UCLASS(config=Game) class ACombatPlayerCharacter : public ACharacter, public ICombatInterface, public IGameplayTagAssetInterface { @@ -31,45 +34,48 @@ class ACombatPlayerCharacter : public ACharacter, public ICombatInterface, publi /** MappingContext */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputMappingContext* DefaultMappingContext; + UInputMappingContext* DefaultMappingContext; /** Jump Input Action */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* JumpAction; + UInputAction* JumpAction; /** Move Input Action */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* MoveAction; + UInputAction* MoveAction; /** Look Input Action */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* LookAction; + UInputAction* LookAction; /* Interact Input Action */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* InteractAction; + UInputAction* InteractAction; /* ToggleCombat Input Action */ UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* ToggleCombatInputAction; + UInputAction* ToggleCombatInputAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* LightAttackAction; + UInputAction* LightAttackAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* HeavyAttackAction; + UInputAction* HeavyAttackAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* DodgeAction; + UInputAction* DodgeAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* ToggleWalkAction; + UInputAction* ToggleWalkAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* SprintAction; + UInputAction* SprintAction; UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) - class UInputAction* ToggleLockOnAction; + UInputAction* ToggleLockOnAction; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) + UInputAction* BlockAction; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Input, meta = (AllowPrivateAccess = "true")) float ChargeAttackTime; @@ -144,6 +150,7 @@ protected: void StartSprint(const FInputActionValue& Value); void StopSprint(const FInputActionValue& Value); void ToggleLockOn(const FInputActionValue& Value); + void Blocking(const FInputActionValue& Value); private://Delegate void CharacterStateBegin(FGameplayTag CharState); @@ -184,6 +191,7 @@ protected: //Check Func bool CanJumping(); bool CanReceiveHitReaction(); bool CanPerformSprint(); + bool CanPerformBlock(); FGameplayTag GetDesiredAttackType(); public: diff --git a/Source/D1/Components/CombatComponent.cpp b/Source/D1/Components/CombatComponent.cpp index 9b4fba61..f7b2285e 100644 --- a/Source/D1/Components/CombatComponent.cpp +++ b/Source/D1/Components/CombatComponent.cpp @@ -19,7 +19,7 @@ void UCombatComponent::SetCombatEnabled(bool bInputCombat) { bCombatEnabled = bInputCombat; - OnCombatToggled.Broadcast(bInputCombat); + OnCombatToggled.Execute(bInputCombat); // ACharacter* character = Cast(GetOwner()); // if (character) @@ -52,3 +52,12 @@ ABaseWeapon* UCombatComponent::GetMainWeapon() const return MainWeapon; } +void UCombatComponent::SetBlockingState(bool enableBlocking) +{ + if(enableBlocking != bIsBlocking) + { + bIsBlocking = enableBlocking; + } + onBlockingSet.Execute(bIsBlocking); // TODO : 이거 맞나? +} + diff --git a/Source/D1/Components/CombatComponent.h b/Source/D1/Components/CombatComponent.h index fda44bc9..9e3b2e2b 100644 --- a/Source/D1/Components/CombatComponent.h +++ b/Source/D1/Components/CombatComponent.h @@ -6,7 +6,8 @@ #include "Components/ActorComponent.h" #include "CombatComponent.generated.h" -DECLARE_MULTICAST_DELEGATE_OneParam(FOnCombatToggled, bool); +DECLARE_DELEGATE_OneParam(FOnCombatToggled, bool); +DECLARE_DELEGATE_OneParam(FOnBlockingSet, bool); class ABaseWeapon; UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) @@ -36,6 +37,10 @@ public: FORCEINLINE void SetAttackCount(int32 count) { AttackCount = count; } FORCEINLINE int32 GetAttackCount() { return AttackCount; } + void SetBlockingState(bool enableBlocking); + FORCEINLINE void SetShieldWeapon(ABaseWeapon* inShield) { EquippedShield = inShield; } + FORCEINLINE ABaseWeapon* GetShieldWeapon() { return EquippedShield; } + private: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) TObjectPtr MainWeapon; @@ -45,10 +50,17 @@ private: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) bool bIsAttackSaved; - + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) int32 AttackCount; + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) + TObjectPtr EquippedShield; + + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) + bool bIsBlocking; + public: //Delegate FOnCombatToggled OnCombatToggled; + FOnBlockingSet onBlockingSet; };