준우파일 복구

This commit is contained in:
2023-09-26 01:26:02 +09:00
parent ba9171056c
commit 263563d5c7
50 changed files with 317 additions and 70 deletions

View File

@@ -0,0 +1,18 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_AnimEnd.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
#include "../PlayerGeneric/DefaultPlayerState.h"
void UAN_AnimEnd::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
ADefaultPlayerState* MyState = MyCharacter->GetPlayerState<ADefaultPlayerState>();
if (!MyState) return;
MyState->SetState(ECharacterState::Idle);
}

View File

@@ -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_AnimEnd.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UAN_AnimEnd : public UAnimNotify
{
GENERATED_BODY()
public:
virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override;
};

View File

@@ -8,11 +8,8 @@
void UAN_Attack::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Attack();
}
}
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
MyCharacter->Attack();
}

View File

@@ -7,11 +7,8 @@
void UAN_Skill1::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill1();
}
}
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
MyCharacter->Skill1();
}

View File

@@ -7,11 +7,8 @@
void UAN_Skill2::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill2();
}
}
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
MyCharacter->Skill2();
}

View File

@@ -7,11 +7,8 @@
void UAN_Skill3::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill3();
}
}
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
MyCharacter->Skill3();
}

View File

@@ -7,11 +7,8 @@
void UAN_Skill4::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill4();
}
}
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
if (!MyCharacter) return;
MyCharacter->Skill4();
}

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill5.h"

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotify.h"
#include "AN_Skill5.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UAN_Skill5 : public UAnimNotify
{
GENERATED_BODY()
};

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill6.h"

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotify.h"
#include "AN_Skill6.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UAN_Skill6 : public UAnimNotify
{
GENERATED_BODY()
};

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill7.h"

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotify.h"
#include "AN_Skill7.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UAN_Skill7 : public UAnimNotify
{
GENERATED_BODY()
};

View File

@@ -4,6 +4,7 @@
#include "DefaultPlayerCharacter.h"
#include "DefaultPlayerState.h"
#include "Engine/DamageEvents.h"
#include "Kismet/GameplayStatics.h"
ADefaultPlayerCharacter::ADefaultPlayerCharacter()
{
@@ -78,9 +79,10 @@ void ADefaultPlayerCharacter::Tick(float DeltaTime)
void ADefaultPlayerCharacter::Attack_Implementation()
{
//UGameplayStatics::ApplyDamage(Target, MyState->GetAttackDamage(), Cast<AController>(GetOwner()), this, UBaseAttack::StaticClass());
}
float ADefaultPlayerCharacter::TakeDamage(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, AActor* DamageCauser)
float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, AActor* DamageCauser)
{
float ReturnValue = Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
@@ -146,28 +148,70 @@ float ADefaultPlayerCharacter::TakeDamage(float DamageAmount, struct FDamageEven
void ADefaultPlayerCharacter::Skill1_Implementation()
{
NetMulticast_Skill1();
}
void ADefaultPlayerCharacter::NetMulticast_Skill1_Implementation()
{
BP_Skill1();
}
void ADefaultPlayerCharacter::Skill2_Implementation()
{
NetMulticast_Skill2();
}
void ADefaultPlayerCharacter::NetMulticast_Skill2_Implementation()
{
BP_Skill2();
}
void ADefaultPlayerCharacter::Skill3_Implementation()
{
NetMulticast_Skill3();
}
void ADefaultPlayerCharacter::NetMulticast_Skill3_Implementation()
{
BP_Skill3();
}
void ADefaultPlayerCharacter::Skill4_Implementation()
{
NetMulticast_Skill4();
}
void ADefaultPlayerCharacter::NetMulticast_Skill4_Implementation()
{
BP_Skill4();
}
void ADefaultPlayerCharacter::Skill5_Implementation()
{
NetMulticast_Skill5();
}
void ADefaultPlayerCharacter::NetMulticast_Skill5_Implementation()
{
BP_Skill5();
}
void ADefaultPlayerCharacter::Skill6_Implementation()
{
NetMulticast_Skill6();
}
void ADefaultPlayerCharacter::NetMulticast_Skill6_Implementation()
{
BP_Skill6();
}
void ADefaultPlayerCharacter::Skill7_Implementation()
{
NetMulticast_Skill7();
}
void ADefaultPlayerCharacter::NetMulticast_Skill7_Implementation()
{
BP_Skill7();
}

View File

@@ -22,27 +22,72 @@ public:
virtual void Tick(float DeltaTime) override;
UFUNCTION(BlueprintNativeEvent)
void Attack() ;
virtual float TakeDamage( float Damage,
void Attack();
UFUNCTION(BlueprintNativeEvent)
float TakeDamage( float Damage,
struct FDamageEvent const& DamageEvent,
AController* EventInstigator,
AActor* DamageCauser ) override;
UFUNCTION(BlueprintNativeEvent)
void Skill1();
UFUNCTION(BlueprintNativeEvent)
void Skill2();
UFUNCTION(BlueprintNativeEvent)
void Skill3();
UFUNCTION(BlueprintNativeEvent)
void Skill4();
UFUNCTION(BlueprintNativeEvent)
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill1();
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill1();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill1();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill2();
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill2();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill2();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill3();
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill3();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill3();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill4();
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill4();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill4();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill5();
UFUNCTION(BlueprintNativeEvent)
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill5();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill5();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill6();
UFUNCTION(BlueprintNativeEvent)
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill6();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill6();
UFUNCTION(BlueprintCallable, Server, Reliable)
void Skill7();
//Override me
UFUNCTION(BlueprintImplementableEvent)
void BP_Skill7();
UFUNCTION(NetMulticast, Reliable)
void NetMulticast_Skill7();
float GetHealth() const { return Health; }
float GetHPRegeneration() const { return HPRegeneration; }