Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
30dc0ec1b4
BIN
Content/FMOD/Desktop/Master.bank
(Stored with Git LFS)
BIN
Content/FMOD/Desktop/Master.bank
(Stored with Git LFS)
Binary file not shown.
BIN
Content/FMOD/Desktop/Master.strings.bank
(Stored with Git LFS)
BIN
Content/FMOD/Desktop/Master.strings.bank
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/E_EnemyState.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/E_EnemyState.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BB_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BB_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BB_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/BT_RangeEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AI/Task/BTTask_RangeAttack.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
BIN
Content/Legumix/Ennemy/RangeEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Levels/LVL_00.umap
(Stored with Git LFS)
BIN
Content/Legumix/Levels/LVL_00.umap
(Stored with Git LFS)
Binary file not shown.
@ -5,7 +5,6 @@
|
|||||||
ALMEnemy::ALMEnemy()
|
ALMEnemy::ALMEnemy()
|
||||||
{
|
{
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
EnemyState = EEnemyState::EES_Chasing;
|
|
||||||
AttackingRadius = 100.f;
|
AttackingRadius = 100.f;
|
||||||
AttackingDamage = 0.f;
|
AttackingDamage = 0.f;
|
||||||
}
|
}
|
||||||
@ -22,11 +21,6 @@ void ALMEnemy::Attack(const APawn* TargetedPawn)
|
|||||||
GEngine->AddOnScreenDebugMessage(1, 2.f, FColor::Cyan, Debug);
|
GEngine->AddOnScreenDebugMessage(1, 2.f, FColor::Cyan, Debug);
|
||||||
}
|
}
|
||||||
|
|
||||||
double ALMEnemy::GetDistanceToTarget(const AActor* TargetedActor)
|
|
||||||
{
|
|
||||||
return (TargetedActor->GetActorLocation() - GetActorLocation()).Length();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ALMEnemy::Tick(float DeltaTime)
|
void ALMEnemy::Tick(float DeltaTime)
|
||||||
{
|
{
|
||||||
Super::Tick(DeltaTime);
|
Super::Tick(DeltaTime);
|
||||||
|
@ -6,13 +6,6 @@
|
|||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
#include "LMEnemy.generated.h"
|
#include "LMEnemy.generated.h"
|
||||||
|
|
||||||
UENUM(BlueprintType)
|
|
||||||
enum class EEnemyState : uint8
|
|
||||||
{
|
|
||||||
EES_Chasing UMETA(DisplayName = "Chasing"),
|
|
||||||
EES_Attacking UMETA(DisplayName = "Attacking")
|
|
||||||
};
|
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class LEGUMEMIX_API ALMEnemy : public ACharacter
|
class LEGUMEMIX_API ALMEnemy : public ACharacter
|
||||||
{
|
{
|
||||||
@ -31,23 +24,12 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
|
||||||
EEnemyState EnemyState;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
double AttackingRadius;
|
double AttackingRadius;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
float AttackingDamage;
|
float AttackingDamage;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the distance between the enemy and a target.
|
|
||||||
* @param TargetedActor
|
|
||||||
* @returns the distance
|
|
||||||
*/
|
|
||||||
UFUNCTION(BlueprintCallable, Category="Legumix", meta=(ReturnDisplayName="Distance", DefaultToSelf="TargetedActor"))
|
|
||||||
double GetDistanceToTarget(const AActor* TargetedActor);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Performs an attack on the targeted pawn
|
* Performs an attack on the targeted pawn
|
||||||
* @param TargetedPawn
|
* @param TargetedPawn
|
||||||
|
Reference in New Issue
Block a user