[박치영] Shield 모션 작업
parent
34180c0ebf
commit
e153ca9ccc
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -46,7 +46,7 @@ ABossEnemy::ABossEnemy()
|
|||
|
||||
//Setting CombatComponent
|
||||
//Setting others is Parents
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &ABossEnemy::OnCombatToggled);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &ABossEnemy::OnCombatToggled);
|
||||
}
|
||||
|
||||
void ABossEnemy::BeginPlay()
|
||||
|
|
|
@ -45,7 +45,7 @@ void ACombatAIController::OnPossess(APawn* InPawn)
|
|||
|
||||
MasterAI = AIpawn;
|
||||
UCombatComponent* combatComponent = MasterAI->GetComponentByClass<UCombatComponent>();
|
||||
combatComponent->OnCombatToggled.BindUObject(this, &ACombatAIController::OnCombatToggle);
|
||||
combatComponent->OnCombatToggled.AddUObject(this, &ACombatAIController::OnCombatToggle);
|
||||
|
||||
RunBehaviorTree(MasterAI->GetBeHaviorTree());
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ AGruntlingEnemy::AGruntlingEnemy()
|
|||
|
||||
//Setting CombatComponent
|
||||
//Setting others is Parents
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &AGruntlingEnemy::OnCombatToggled);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &AGruntlingEnemy::OnCombatToggled);
|
||||
}
|
||||
|
||||
void AGruntlingEnemy::BeginPlay()
|
||||
|
|
|
@ -44,7 +44,7 @@ AHeavyMobEnemy::AHeavyMobEnemy()
|
|||
|
||||
//Setting CombatComponent
|
||||
//Setting others is Parents
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &AHeavyMobEnemy::OnCombatToggled);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &AHeavyMobEnemy::OnCombatToggled);
|
||||
}
|
||||
|
||||
void AHeavyMobEnemy::BeginPlay()
|
||||
|
|
|
@ -38,7 +38,7 @@ AMobEnemy::AMobEnemy()
|
|||
|
||||
//Setting CombatComponent
|
||||
//Setting others is Parents
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &AMobEnemy::OnCombatToggled);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &AMobEnemy::OnCombatToggled);
|
||||
}
|
||||
|
||||
void AMobEnemy::BeginPlay()
|
||||
|
|
|
@ -14,7 +14,7 @@ void ABaseShield::OnEquipped()
|
|||
if (!owner)
|
||||
return;
|
||||
CombatComponent = owner->GetComponentByClass<UCombatComponent>();
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &ABaseWeapon::ToggleWeaponCombat);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &ABaseWeapon::ToggleWeaponCombat);
|
||||
|
||||
OwnerStateManager = owner->GetComponentByClass<UStateManagerComponent>();
|
||||
|
||||
|
|
|
@ -51,11 +51,11 @@ void ABaseWeapon::OnEquipped()
|
|||
if (!owner)
|
||||
return;
|
||||
CombatComponent = owner->GetComponentByClass<UCombatComponent>();
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &ABaseWeapon::ToggleWeaponCombat);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &ABaseWeapon::ToggleWeaponCombat);
|
||||
|
||||
OwnerStateManager = owner->GetComponentByClass<UStateManagerComponent>();
|
||||
|
||||
if (CombatComponent->GetCombatEnabled()) //TODO : 방패 착용 후 Toggle Event 시 Weapon의 소켓이 안바뀌는 버그
|
||||
if (CombatComponent->GetCombatEnabled())
|
||||
AttachActor(HandSocketName);
|
||||
else
|
||||
AttachActor(AttachSocketName);
|
||||
|
|
|
@ -21,8 +21,8 @@ void UCombatAnimInstance::NativeInitializeAnimation()
|
|||
ensure(CombatComponent);
|
||||
if(IsValid(CombatComponent))
|
||||
{
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &UCombatAnimInstance::UpdateCombatEnabled);
|
||||
CombatComponent->OnBlockingSet.BindUObject(this, &UCombatAnimInstance::OnBlockingSet_Event);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &UCombatAnimInstance::UpdateCombatEnabled);
|
||||
CombatComponent->OnBlockingSet.AddUObject(this, &UCombatAnimInstance::OnBlockingSet_Event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ ACombatPlayerCharacter::ACombatPlayerCharacter()
|
|||
|
||||
// Setting CombatComponent
|
||||
CombatComponent = CreateDefaultSubobject<UCombatComponent>(TEXT("CombatComponent"));
|
||||
CombatComponent->OnCombatToggled.BindUObject(this, &ACombatPlayerCharacter::CharacterCombatToggled);
|
||||
CombatComponent->OnCombatToggled.AddUObject(this, &ACombatPlayerCharacter::CharacterCombatToggled);
|
||||
|
||||
// Setting StateManagerComponent
|
||||
StateManagerComponent = CreateDefaultSubobject<UStateManagerComponent>(TEXT("StateManagerComponent"));
|
||||
|
@ -251,7 +251,8 @@ void ACombatPlayerCharacter::SetupPlayerInputComponent(class UInputComponent* Pl
|
|||
EnhancedInputComponent->BindAction(ToggleLockOnAction, ETriggerEvent::Started, this, &ACombatPlayerCharacter::ToggleLockOn);
|
||||
|
||||
//Block
|
||||
EnhancedInputComponent->BindAction(ToggleLockOnAction, ETriggerEvent::Started, this, &ACombatPlayerCharacter::ToggleLockOn);
|
||||
EnhancedInputComponent->BindAction(BlockAction, ETriggerEvent::Triggered, this, &ACombatPlayerCharacter::Blocking);
|
||||
EnhancedInputComponent->BindAction(BlockAction, ETriggerEvent::Completed, this, &ACombatPlayerCharacter::StopBlocking);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -545,10 +546,11 @@ void ACombatPlayerCharacter::Blocking(const FInputActionValue& Value)
|
|||
{
|
||||
CombatComponent->SetBlockingState(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
void ACombatPlayerCharacter::StopBlocking(const FInputActionValue& Value)
|
||||
{
|
||||
CombatComponent->SetBlockingState(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ACombatPlayerCharacter::CharacterStateBegin(FGameplayTag CharState)
|
||||
|
|
|
@ -151,6 +151,7 @@ protected:
|
|||
void StopSprint(const FInputActionValue& Value);
|
||||
void ToggleLockOn(const FInputActionValue& Value);
|
||||
void Blocking(const FInputActionValue& Value);
|
||||
void StopBlocking(const FInputActionValue& Value);
|
||||
|
||||
private://Delegate
|
||||
void CharacterStateBegin(FGameplayTag CharState);
|
||||
|
|
|
@ -19,7 +19,7 @@ void UCombatComponent::SetCombatEnabled(bool bInputCombat)
|
|||
{
|
||||
bCombatEnabled = bInputCombat;
|
||||
|
||||
OnCombatToggled.Execute(bInputCombat);
|
||||
OnCombatToggled.Broadcast(bInputCombat);
|
||||
|
||||
// ACharacter* character = Cast<ACharacter>(GetOwner());
|
||||
// if (character)
|
||||
|
@ -57,7 +57,7 @@ void UCombatComponent::SetBlockingState(bool enableBlocking)
|
|||
if(enableBlocking != bIsBlocking)
|
||||
{
|
||||
bIsBlocking = enableBlocking;
|
||||
OnBlockingSet.Execute(bIsBlocking);
|
||||
OnBlockingSet.Broadcast(bIsBlocking);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include "Components/ActorComponent.h"
|
||||
#include "CombatComponent.generated.h"
|
||||
|
||||
DECLARE_DELEGATE_OneParam(FOnCombatToggled, bool);
|
||||
DECLARE_DELEGATE_OneParam(FOnBlockingSet, bool);
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FOnCombatToggled, bool);
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FOnBlockingSet, bool);
|
||||
|
||||
class ABaseWeapon;
|
||||
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
|
||||
|
|
Loading…
Reference in New Issue