Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4fef438a95
BIN
Content/Legumix/BP_GameMode.uasset
(Stored with Git LFS)
BIN
Content/Legumix/BP_GameMode.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Legumix/Ennemy/DistantEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/DistantEnemy/AIC_DistantEnnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/DistantEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/DistantEnemy/BP_DistantEnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/DistantEnemy/M_DistantEnemyTemp.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/DistantEnemy/M_DistantEnemyTemp.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BB_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BB_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/BT_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_Attack.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_Attack.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/AI/Task/BTTask_FindPlayer.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemyController.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemyController.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/M_MeleeEnemyTemp.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/M_MeleeEnemyTemp.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/MeleeEnemy/SKM_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/MeleeEnemy/SKM_MeleeEnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/BB_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/BB_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/BTDecorator_ConditionToRepositionate.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/BTDecorator_ConditionToRepositionate.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/BT_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/BT_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/EQC_Player.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/EQC_Player.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/EQSTester.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/EQSTester.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Ennemy/Range/EQS_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Legumix/Ennemy/Range/EQS_RangeEnnemy.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Legumix/Levels/LVL_GYM_00.umap
(Stored with Git LFS)
BIN
Content/Legumix/Levels/LVL_GYM_00.umap
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,30 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#include "Enemy/DistantEnemy/LMDistantEnemy.h"
|
||||||
|
|
||||||
|
ALMDistantEnemy::ALMDistantEnemy()
|
||||||
|
{
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMDistantEnemy::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMDistantEnemy::Attack(const APawn* TargetedPawn)
|
||||||
|
{
|
||||||
|
Super::Attack(TargetedPawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMDistantEnemy::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMDistantEnemy::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||||
|
{
|
||||||
|
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||||
|
}
|
||||||
|
|
37
Source/LegumeMix/Private/Enemy/LMEnemy.cpp
Normal file
37
Source/LegumeMix/Private/Enemy/LMEnemy.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#include "Enemy/LMEnemy.h"
|
||||||
|
|
||||||
|
ALMEnemy::ALMEnemy()
|
||||||
|
{
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
EnemyState = EEnemyState::EES_Chasing;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMEnemy::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMEnemy::Attack(const APawn* TargetedPawn)
|
||||||
|
{
|
||||||
|
// TO DO
|
||||||
|
FString Debug = FString::Printf(TEXT("Enemy %s attack %s !"), *GetName(), *TargetedPawn->GetName());
|
||||||
|
GEngine->AddOnScreenDebugMessage(1, 2.f, FColor::Cyan, Debug);
|
||||||
|
}
|
||||||
|
|
||||||
|
double ALMEnemy::GetDistanceToTarget(const AActor* TargetedActor)
|
||||||
|
{
|
||||||
|
return (TargetedActor->GetActorLocation() - GetActorLocation()).Length();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMEnemy::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMEnemy::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||||
|
{
|
||||||
|
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||||
|
}
|
||||||
|
|
30
Source/LegumeMix/Private/Enemy/MeleeEnemy/LMMeleeEnemy.cpp
Normal file
30
Source/LegumeMix/Private/Enemy/MeleeEnemy/LMMeleeEnemy.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#include "Enemy/MeleeEnemy/LMMeleeEnemy.h"
|
||||||
|
|
||||||
|
ALMMeleeEnemy::ALMMeleeEnemy()
|
||||||
|
{
|
||||||
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
AttackingRadius = 100.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMMeleeEnemy::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMMeleeEnemy::Attack(const APawn* TargetedPawn)
|
||||||
|
{
|
||||||
|
Super::Attack(TargetedPawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMMeleeEnemy::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ALMMeleeEnemy::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||||
|
{
|
||||||
|
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||||
|
}
|
23
Source/LegumeMix/Public/Enemy/DistantEnemy/LMDistantEnemy.h
Normal file
23
Source/LegumeMix/Public/Enemy/DistantEnemy/LMDistantEnemy.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Enemy/LMEnemy.h"
|
||||||
|
#include "LMDistantEnemy.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class LEGUMEMIX_API ALMDistantEnemy : public ALMEnemy
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
ALMDistantEnemy();
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
virtual void Attack(const APawn* TargetedPawn) override;
|
||||||
|
|
||||||
|
};
|
50
Source/LegumeMix/Public/Enemy/LMEnemy.h
Normal file
50
Source/LegumeMix/Public/Enemy/LMEnemy.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Character.h"
|
||||||
|
#include "LMEnemy.generated.h"
|
||||||
|
|
||||||
|
UENUM(BlueprintType)
|
||||||
|
enum class EEnemyState : uint8
|
||||||
|
{
|
||||||
|
EES_Chasing UMETA(DisplayName = "Chasing"),
|
||||||
|
EES_Attacking UMETA(DisplayName = "Attacking")
|
||||||
|
};
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class LEGUMEMIX_API ALMEnemy : public ACharacter
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
ALMEnemy();
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
|
EEnemyState EnemyState;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"), Category = "Legumix")
|
||||||
|
double AttackingRadius;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the distance between the enemy and a target.
|
||||||
|
* @param TargetedPawn
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Legumix", meta=(DefaultToSelf="TargetedPawn"))
|
||||||
|
virtual void Attack(const APawn* TargetedPawn);
|
||||||
|
};
|
23
Source/LegumeMix/Public/Enemy/MeleeEnemy/LMMeleeEnemy.h
Normal file
23
Source/LegumeMix/Public/Enemy/MeleeEnemy/LMMeleeEnemy.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Enemy/LMEnemy.h"
|
||||||
|
#include "LMMeleeEnemy.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class LEGUMEMIX_API ALMMeleeEnemy : public ALMEnemy
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
ALMMeleeEnemy();
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
virtual void Attack(const APawn* TargetedPawn) override;
|
||||||
|
|
||||||
|
};
|
Reference in New Issue
Block a user