Merge remote-tracking branch 'origin/master'

This commit is contained in:
TjgL 2025-01-24 14:59:47 +01:00
commit 4fef438a95
25 changed files with 247 additions and 3 deletions

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

Binary file not shown.

BIN
Content/Legumix/Ennemy/DistantEnemy/BP_DistantEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Legumix/Ennemy/MeleeEnemy/BP_MeleeEnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

BIN
Content/Legumix/Ennemy/Range/BB_RangeEnnemy.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
Content/Legumix/Levels/LVL_GYM_00.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -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);
}

View 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);
}

View 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);
}

View 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;
};

View 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);
};

View 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;
};