Initial commit

This commit is contained in:
2023-09-25 23:01:30 +09:00
commit ba9171056c
478 changed files with 3673 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class PrometherTarget : TargetRules
{
public PrometherTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
ExtraModuleNames.Add("Promether");
}
}

View File

@@ -0,0 +1,18 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Attack.h"
#include "GameFramework/Controller.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
void UAN_Attack::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Attack();
}
}
}

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

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill1.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
void UAN_Skill1::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill1();
}
}
}

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

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill2.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
void UAN_Skill2::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill2();
}
}
}

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

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill3.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
void UAN_Skill3::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill3();
}
}
}

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

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "AN_Skill4.h"
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
void UAN_Skill4::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
if (ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>())
{
if (AController* MyController = MyCharacter->GetController())
{
MyCharacter->Skill4();
}
}
}

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

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "BaseAttack.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 "GameFramework/DamageType.h"
#include "BaseAttack.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UBaseAttack : public UDamageType
{
GENERATED_BODY()
};

View File

@@ -0,0 +1,34 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultGameInstance.h"
UDefaultGameInstance::UDefaultGameInstance()
{
//ConstructorHelpers::FObjectFinder<UClass> LUKRIEL(TEXT(""));
ConstructorHelpers::FObjectFinder<UClass> ALLIUM(TEXT("Class'/Game/Character/Allium/BP_Allium.BP_Allium_C'"));
ConstructorHelpers::FObjectFinder<UClass> RIANA(TEXT("Class'/Game/Character/Riana/BP_Riana.BP_Riana_C'"));
ConstructorHelpers::FObjectFinder<UClass> LB(TEXT("Class'/Game/Character/Lb/BP_Lb.BP_Lb_C'"));
if
(
//!LUKRIEL.Succeeded() ||
!ALLIUM.Succeeded() ||
!RIANA.Succeeded() ||
!LB.Succeeded()
)
{
UE_LOG(LogTemp, Error, TEXT("Blueprint asset load failed."));
return;
}
BP_Characters[int(CharacterType::Lukriel)] = NULL;
BP_Characters[int(CharacterType::Allium)] = ALLIUM.Object;
BP_Characters[int(CharacterType::Riana)] = RIANA.Object;
BP_Characters[int(CharacterType::Lb)] = LB.Object;
}
void UDefaultGameInstance::Init()
{
UE_LOG(LogTemp, Warning, TEXT("UDefaultGameInstance Loaded"));
}

View File

@@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include "PrometherEnum.h"
#include "DefaultGameInstance.generated.h"
UCLASS()
class PROMETHER_API UDefaultGameInstance : public UGameInstance
{
GENERATED_BODY()
public:
UDefaultGameInstance();
virtual void Init() override;
UClass* GetCharacterBPRef(CharacterType Type) { return BP_Characters[(uint8)Type]; }
private:
UPROPERTY()
UClass* BP_Characters[(uint8)CharacterType::SIZE];
};

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultGameStateBase.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 "GameFramework/GameStateBase.h"
#include "DefaultGameStateBase.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API ADefaultGameStateBase : public AGameStateBase
{
GENERATED_BODY()
};

View File

@@ -0,0 +1,79 @@
#pragma once
#include "CoreMinimal.h"
#include "DefaultStats.generated.h"
USTRUCT(Atomic, BlueprintType)
struct FDefaultStats
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 XP;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Health;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float HPRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float HealAndShieldpower;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Armor;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MagicResistance;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Tenacity;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float SlowRisist;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AttackSpeed;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AttackDamage;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AbilityPower;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float CriticalStrikeChance;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float CriticalStrikeDamage;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float ArmorPenetration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MagicPenetration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float LifeSteal;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float PhysicalVamp;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Omnivamp;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AbilityHaste;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Mana;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float ManaRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float Energy;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float EnergyRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AttackRange;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MovementSpeed;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float GoldGeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AttackDamageGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float AttackSpeedGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float ArmorGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MagicResistanceGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float HealthGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float HealthRegenerationGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float ManaGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float ManaRegenerationGrowth;
};

View File

@@ -0,0 +1,151 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "Deathmatch.h"
#include "Kismet/GameplayStatics.h"
#include "GameFramework/PlayerStart.h"
#include "Engine/PlayerStartPIE.h"
#include "EngineUtils.h"
#include "../PrometherEnum.h"
#include "../PlayerGeneric/DefaultPlayerController.h"
#include "../DefaultGameInstance.h"
#include "../PlayerGeneric/DefaultPlayerState.h"
#include "../DefaultGameStateBase.h"
#include "../PlayerGeneric/DefaultPlayerCamera.h"
ADeathmatch::ADeathmatch()
{
PrimaryActorTick.bCanEverTick = true;
//DefaultPawnClass = AActor::StaticClass();
PlayerControllerClass = ADefaultPlayerController::StaticClass();
PlayerStateClass = ADefaultPlayerState::StaticClass();
GameStateClass = ADefaultGameStateBase::StaticClass();
}
void ADeathmatch::Tick(float DeltaSeconds)
{
/*
UWorld* World = GetWorld();
for (TActorIterator<AActor> It(World); It; ++It)
{
if (AController* Con = It->GetInstigatorController())
{
if (APlayerState* Sta = Con->GetPlayerState<APlayerState>())
{
if (ADefaultPlayerState* MyState = Cast<ADefaultPlayerState>(Sta))
{
UE_LOG(LogTemp, Warning, TEXT("Server %s State = %d"), *It->GetName(), MyState->GetState());
}
}
}
}
*/
}
AActor* ADeathmatch::ChoosePlayerStart_Implementation(AController* Player)
{
// Choose a player start
APlayerStart* FoundPlayerStart = nullptr;
UClass* PawnClass = nullptr;
if (ADefaultPlayerState* NewPlayerState = Player->GetPlayerState<ADefaultPlayerState>())
{
PawnClass = NewPlayerState->GetCharacterBPRef();
}
APawn* PawnToFit = PawnClass ? PawnClass->GetDefaultObject<APawn>() : nullptr;
TArray<APlayerStart*> UnOccupiedStartPoints;
TArray<APlayerStart*> OccupiedStartPoints;
UWorld* World = GetWorld();
for (TActorIterator<APlayerStart> It(World); It; ++It)
{
APlayerStart* PlayerStart = *It;
if (PlayerStart->IsA<APlayerStartPIE>())
{
// Always prefer the first "Play from Here" PlayerStart, if we find one while in PIE mode
FoundPlayerStart = PlayerStart;
break;
}
else
{
FVector ActorLocation = PlayerStart->GetActorLocation();
const FRotator ActorRotation = PlayerStart->GetActorRotation();
if (!World->EncroachingBlockingGeometry(PawnToFit, ActorLocation, ActorRotation))
{
UnOccupiedStartPoints.Add(PlayerStart);
}
else if (World->FindTeleportSpot(PawnToFit, ActorLocation, ActorRotation))
{
OccupiedStartPoints.Add(PlayerStart);
}
}
}
if (FoundPlayerStart == nullptr)
{
if (UnOccupiedStartPoints.Num() > 0)
{
FoundPlayerStart = UnOccupiedStartPoints[FMath::RandRange(0, UnOccupiedStartPoints.Num() - 1)];
}
else if (OccupiedStartPoints.Num() > 0)
{
FoundPlayerStart = OccupiedStartPoints[FMath::RandRange(0, OccupiedStartPoints.Num() - 1)];
}
}
return FoundPlayerStart;
}
APawn* ADeathmatch::SpawnDefaultPawnAtTransform_Implementation(AController* NewPlayer, const FTransform& SpawnTransform)
{
FActorSpawnParameters SpawnInfo;
SpawnInfo.Instigator = GetInstigator();
SpawnInfo.ObjectFlags |= RF_Transient; // We never want to save default player pawns into a map
UClass* PawnClass = nullptr;
if (ADefaultPlayerState* NewPlayerState = NewPlayer->GetPlayerState<ADefaultPlayerState>())
{
PawnClass = NewPlayerState->GetCharacterBPRef();
}
APawn* ResultPawn = GetWorld()->SpawnActor<APawn>(PawnClass, SpawnTransform, SpawnInfo);
if (!ResultPawn)
{
UE_LOG(LogGameMode, Warning, TEXT("SpawnDefaultPawnAtTransform: Couldn't spawn Pawn of type %s at %s"), *GetNameSafe(PawnClass), *SpawnTransform.ToHumanReadableString());
}
return ResultPawn;
}
FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const FUniqueNetIdRepl& UniqueId, const FString& Options, const FString& Portal)
{
FString ErrorMessage = Super::InitNewPlayer(NewPlayerController, UniqueId, Options, Portal);
if (ErrorMessage != "")
{
return ErrorMessage;
}
CharacterType Type = CharacterType(FCString::Atoi(*UGameplayStatics::ParseOption(Options, TEXT("CharacterType"))));
TeamType Team = TeamType(FCString::Atoi(*UGameplayStatics::ParseOption(Options, TEXT("Team"))));
//DebugPerpose
if (Type == CharacterType::Lukriel)
{
Type = CharacterType::Lb;
}
if (Team == TeamType::Null)
{
Team = TeamType::Black;
}
if (ADefaultPlayerState* NewPlayerState = NewPlayerController->GetPlayerState<ADefaultPlayerState>())
{
NewPlayerState->SetCharacterBPRef(GetGameInstance<UDefaultGameInstance>()->GetCharacterBPRef(Type));
//NewPlayerState->InitPlayerStats();
NewPlayerState->SetTeam(Team);
}
return ErrorMessage;
}

View File

@@ -0,0 +1,24 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "Deathmatch.generated.h"
UCLASS()
class PROMETHER_API ADeathmatch : public AGameModeBase
{
GENERATED_BODY()
public:
ADeathmatch();
virtual void Tick(float DeltaSeconds) override;
virtual AActor* ChoosePlayerStart_Implementation(AController* Player) override;
virtual APawn* SpawnDefaultPawnAtTransform_Implementation(AController* NewPlayer, const FTransform& SpawnTransform) override;
private:
virtual FString InitNewPlayer(APlayerController* NewPlayerController, const FUniqueNetIdRepl& UniqueId, const FString& Options, const FString& Portal = TEXT("")) override;
};

View File

@@ -0,0 +1,34 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyActor.h"
#include "Net/UnrealNetwork.h"
// Sets default values
AMyActor::AMyActor()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void AMyActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AMyActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void AMyActor::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AMyActor, example);
}

View File

@@ -0,0 +1,30 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "PrometherEnum.h"
#include "MyActor.generated.h"
UCLASS()
class PROMETHER_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
void GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const override;
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite)
FDefaultStats example;
};

View File

@@ -0,0 +1,35 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultAnimBPBase.h"
#include "DefaultPlayerState.h"
UDefaultAnimBPBase::UDefaultAnimBPBase()
{
State = ECharacterState::Idle;
}
void UDefaultAnimBPBase::NativeUpdateAnimation(float DeltaSeconds)
{
Super::NativeUpdateAnimation(DeltaSeconds);
if (APawn* MyPawn = TryGetPawnOwner())
{
if (ADefaultPlayerState* MyPlayerState = MyPawn->GetPlayerState<ADefaultPlayerState>())
{
State = MyPlayerState->GetState();
AttackType = MyPlayerState->GetAttackType();
/*
if (!GPlayInEditorID)
{
UE_LOG(LogTemp, Warning, TEXT("Server %s State : %d"), *MyPawn->GetName(), State);
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Client %d %s State : %d"), GPlayInEditorID, *MyPawn->GetName(), State);
}
*/
}
}
}

View File

@@ -0,0 +1,25 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Animation/AnimInstance.h"
#include "../PrometherEnum.h"
#include "DefaultAnimBPBase.generated.h"
UCLASS()
class PROMETHER_API UDefaultAnimBPBase : public UAnimInstance
{
GENERATED_BODY()
public:
UDefaultAnimBPBase();
virtual void NativeUpdateAnimation(float DeltaSeconds) override;
UPROPERTY(Transient, BlueprintReadWrite)
ECharacterState State;
UPROPERTY(Transient, BlueprintReadWrite)
CooldownType AttackType;
};

View File

@@ -0,0 +1,13 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultMovementRule.h"
UDefaultMovementRule::UDefaultMovementRule()
{
GroundFriction = 1000;
MaxWalkSpeed = 400;
MaxAcceleration = 2147483647;
bOrientRotationToMovement = true;
RotationRate = FRotator(0, 720, 0);
}

View File

@@ -0,0 +1,19 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "DefaultMovementRule.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UDefaultMovementRule : public UCharacterMovementComponent
{
GENERATED_BODY()
public:
UDefaultMovementRule();
};

View File

@@ -0,0 +1,32 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultPlayerCamera.h"
ADefaultPlayerCamera::ADefaultPlayerCamera(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
bReplicates = true;
PrimaryActorTick.bCanEverTick = true;
CameraSpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"));
CameraSpringArm->SetRelativeLocationAndRotation(FVector(0.0f, 0.0f, 0.0f), FRotator(-45.0f, 0.0f, 0.0f));
CameraSpringArm->SetAbsolute(false, true, true);
CameraSpringArm->TargetArmLength = 1000.f;
CameraSpringArm->bEnableCameraLag = true;
CameraSpringArm->bDoCollisionTest = false;
CameraSpringArm->CameraLagSpeed = 3.0f;
SetRootComponent(CameraSpringArm);
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName);
}
// Called every frame
void ADefaultPlayerCamera::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}

View File

@@ -0,0 +1,29 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameFramework/SpringArmComponent.h"
#include "Camera/CameraComponent.h"
#include "DefaultPlayerCamera.generated.h"
UCLASS()
class PROMETHER_API ADefaultPlayerCamera : public AActor
{
GENERATED_BODY()
public:
ADefaultPlayerCamera(const FObjectInitializer& ObjectInitializer);
protected:
UPROPERTY(EditAnywhere)
USpringArmComponent* CameraSpringArm;
UPROPERTY(EditAnywhere)
UCameraComponent* Camera;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};

View File

@@ -0,0 +1,173 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultPlayerCharacter.h"
#include "DefaultPlayerState.h"
#include "Engine/DamageEvents.h"
ADefaultPlayerCharacter::ADefaultPlayerCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
SetCanBeDamaged(true);
bUseControllerRotationYaw = false;
CameraSpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"));
CameraSpringArm->SetRelativeLocationAndRotation(FVector(0.0f, 0.0f, 0.0f), FRotator(-45.0f, 0.0f, 0.0f));
CameraSpringArm->SetAbsolute(false, true, true);
CameraSpringArm->TargetArmLength = 2000.f;
CameraSpringArm->bEnableCameraLag = true;
CameraSpringArm->bDoCollisionTest = false;
CameraSpringArm->CameraLagSpeed = 3.0f;
CameraSpringArm->SetupAttachment(RootComponent);
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName);
Health = 0.0f;
HPRegeneration = 0.0f;
HealAndShieldpower = 0.0f;
Armor = 0.0f;
MagicResistance = 0.0f;
Tenacity = 0.0f;
SlowRisist = 0.0f;
AttackSpeed = 0.0f;
AttackDamage = 0.0f;
AbilityPower = 0.0f;
CriticalStrikeChance = 0.0f;
CriticalStrikeDamage = 0.0f;
ArmorPenetration = 0.0f;
MagicPenetration = 0.0f;
LifeSteal = 0.0f;
PhysicalVamp = 0.0f;
Omnivamp = 0.0f;
AbilityHaste = 0.0f;
Mana = 0.0f;
ManaRegeneration = 0.0f;
Energy = 0.0f;
EnergyRegeneration = 0.0f;
AttackRange = 0.0f;
MovementSpeed = 0.0f;
GoldGeneration = 0.0f;
AttackDamageGrowth = 0.0f;
AttackSpeedGrowth = 0.0f;
ArmorGrowth = 0.0f;
MagicResistanceGrowth = 0.0f;
HealthGrowth = 0.0f;
HealthRegenerationGrowth = 0.0f;
ManaGrowth = 0.0f;
ManaRegenerationGrowth = 0.0f;
}
void ADefaultPlayerCharacter::Tick(float DeltaTime)
{
/*
if (GetPlayerState<ADefaultPlayerState>())
{
if (!GPlayInEditorID)
{
UE_LOG(LogTemp, Warning, TEXT("Server %s State : %d"), *GetName(), GetPlayerState<ADefaultPlayerState>()->GetState());
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Client %d %s State : %d"), GPlayInEditorID, *GetName(), GetPlayerState<ADefaultPlayerState>()->GetState());
}
}
*/
}
void ADefaultPlayerCharacter::Attack_Implementation()
{
}
float ADefaultPlayerCharacter::TakeDamage(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, AActor* DamageCauser)
{
float ReturnValue = Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);
if (HasAuthority())
{
UE_LOG(LogTemp, Warning, TEXT("TakeDamage Called On Server"));
}
else
{
UE_LOG(LogTemp, Warning, TEXT("TakeDamage Called On Client"));
}
if (HasAuthority())
{
if (ADefaultPlayerState* MyState = this->GetInstigatorController()->GetPlayerState<ADefaultPlayerState>())
{
if (ADefaultPlayerState* EventInstigatorState = EventInstigator->GetPlayerState<ADefaultPlayerState>())
{
float ADDamageMultiplier = 0;
float APDamageMultiplier = 0;
if (MyState->Stats.Armor >= 0)
ADDamageMultiplier = 100 / (100 + MyState->Stats.Armor);
else
ADDamageMultiplier = 2 - 100 / (100 - MyState->Stats.Armor);
if (MyState->Stats.MagicResistance >= 0)
APDamageMultiplier = 100 / (100 + MyState->Stats.MagicResistance);
else
APDamageMultiplier = 2 - 100 / (100 - MyState->Stats.MagicResistance);
UE_LOG(LogTemp, Warning, TEXT("%s : ADDamageMultiplier : %f CalculatedDamage : %f"), *DamageCauser->GetName(), ADDamageMultiplier, DamageAmount * ADDamageMultiplier);
UE_LOG(LogTemp, Warning, TEXT("%s : APDamageMultiplier : %f CalculatedDamage : %f"), *DamageCauser->GetName(), APDamageMultiplier, DamageAmount * APDamageMultiplier);
if (Cast<UBaseAttack>(DamageEvent.DamageTypeClass->GetDefaultObject()))
{
UE_LOG(LogTemp, Warning, TEXT("DamageType : BaseAttack"));
float UpdatedHealth = MyState->Stats.Health - EventInstigatorState->Stats.AttackDamage * ADDamageMultiplier;
if (UpdatedHealth < 0)
{
MyState->Stats.Health = 0;
}
else
{
MyState->Stats.Health = UpdatedHealth;
}
UE_LOG(LogTemp, Warning, TEXT("Current Health : %f"), MyState->Stats.Health);
}
}
}
return ReturnValue;
}
else
{
return -1.0f;
}
}
void ADefaultPlayerCharacter::Skill1_Implementation()
{
}
void ADefaultPlayerCharacter::Skill2_Implementation()
{
}
void ADefaultPlayerCharacter::Skill3_Implementation()
{
}
void ADefaultPlayerCharacter::Skill4_Implementation()
{
}
void ADefaultPlayerCharacter::Skill5_Implementation()
{
}
void ADefaultPlayerCharacter::Skill6_Implementation()
{
}
void ADefaultPlayerCharacter::Skill7_Implementation()
{
}

View File

@@ -0,0 +1,164 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "GameFramework/SpringArmComponent.h"
#include "Camera/CameraComponent.h"
#include "../PrometherEnum.h"
#include "DefaultPlayerCharacter.generated.h"
UCLASS()
class PROMETHER_API ADefaultPlayerCharacter : public ACharacter
{
GENERATED_BODY()
public:
// Sets default values for this character's properties
ADefaultPlayerCharacter();
virtual void Tick(float DeltaTime) override;
UFUNCTION(BlueprintNativeEvent)
void Attack() ;
virtual 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)
void Skill5();
UFUNCTION(BlueprintNativeEvent)
void Skill6();
UFUNCTION(BlueprintNativeEvent)
void Skill7();
float GetHealth() const { return Health; }
float GetHPRegeneration() const { return HPRegeneration; }
float GetHealAndShieldpower() const { return HealAndShieldpower; }
float GetArmor() const { return Armor; }
float GetMagicResistance() const { return MagicResistance; }
float GetTenacity() const { return Tenacity; }
float GetSlowRisist() const { return SlowRisist; }
float GetAttackSpeed() const { return AttackSpeed; }
float GetAttackDamage() const { return AttackDamage; }
float GetAbilityPower() const { return AbilityPower; }
float GetCriticalStrikeChance() const { return CriticalStrikeChance; }
float GetCriticalStrikeDamage() const { return CriticalStrikeDamage; }
float GetArmorPenetration() const { return ArmorPenetration; }
float GetMagicPenetration() const { return MagicPenetration; }
float GetLifeSteal() const { return LifeSteal; }
float GetPhysicalVamp() const { return PhysicalVamp; }
float GetOmnivamp() const { return Omnivamp; }
float GetAbilityHaste() const { return AbilityHaste; }
const float* GetCooldownDuration() const { return CooldownDuration; }
float GetMana() const { return Mana; }
float GetManaRegeneration() const { return ManaRegeneration; }
float GetEnergy() const { return Energy; }
float GetEnergyRegeneration() const { return EnergyRegeneration; }
float GetAttackRange() const { return AttackRange; }
float GetMovementSpeed() const { return MovementSpeed; }
float GetGoldGeneration() const { return GoldGeneration; }
float GetAttackDamageGrowth() const { return AttackDamageGrowth; }
float GetAttackSpeedGrowth() const { return AttackSpeedGrowth; }
float GetArmorGrowth() const { return ArmorGrowth; }
float GetMagicResistanceGrowth() const { return MagicResistanceGrowth; }
float GetHealthGrowth() const { return HealthGrowth; }
float GetHealthRegenerationGrowth() const { return HealthRegenerationGrowth; }
float GetManaGrowth() const { return ManaGrowth; }
float GetManaRegenerationGrowth() const { return ManaRegenerationGrowth; }
protected:
UPROPERTY(EditAnywhere)
USpringArmComponent* CameraSpringArm;
UPROPERTY(EditAnywhere)
UCameraComponent* Camera;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float Health;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float HPRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float HealAndShieldpower;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float Armor;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float MagicResistance;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float Tenacity;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
float SlowRisist;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float AttackSpeed;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float AttackDamage;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float AbilityPower;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float CriticalStrikeChance;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float CriticalStrikeDamage;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float ArmorPenetration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float MagicPenetration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float LifeSteal;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float PhysicalVamp;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
float Omnivamp;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Haste")
float AbilityHaste;
UPROPERTY(EditAnywhere, Category = "Stats|Utility|Haste")
float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, };
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
float Mana;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
float ManaRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
float Energy;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
float EnergyRegeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility")
float AttackRange;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility")
float MovementSpeed;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Non-Combat")
float GoldGeneration;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float AttackDamageGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float AttackSpeedGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float ArmorGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float MagicResistanceGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float HealthGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float HealthRegenerationGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float ManaGrowth;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
float ManaRegenerationGrowth;
};

View File

@@ -0,0 +1,460 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "DefaultPlayerController.h"
#include "EnhancedInputSubsystems.h"
#include "EnhancedInputComponent.h"
#include "GameFramework/Character.h"
#include "Components/CapsuleComponent.h"
#include "Blueprint/AIBlueprintHelperLibrary.h"
#include "NavigationSystem.h"
#include "Navigation/PathFollowingComponent.h"
#include "AIController.h"
#include "DefaultPlayerState.h"
#include "DefaultPlayerCamera.h"
void ADefaultPlayerController::BeginPlay()
{
Super::BeginPlay();
if (ULocalPlayer* LocalPlayer = Cast<ULocalPlayer>(Player)) {
if (UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>()) {
if (!PlayerInputMapping.IsNull()) {
InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0);
}
else {
UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed"));
}
}
}
this->bShowMouseCursor = true;
}
void ADefaultPlayerController::OnPossess(APawn* aPawn)
{
Super::OnPossess(aPawn);
Server_SpawnPlayerCamera();
AActor *PlayerCamera = GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera();
if (PlayerCamera)
{
SetViewTarget(PlayerCamera);
UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName());
}
else
{
UE_LOG(LogTemp, Error, TEXT("GetPlayerCamera Failed."));
}
}
void ADefaultPlayerController::OnUnPossess()
{
Super::OnUnPossess();
}
void ADefaultPlayerController::Server_SpawnPlayerCamera_Implementation()
{
AActor* OutContextPlayerCamera = nullptr;
FActorSpawnParameters SpawnInfo;
SpawnInfo.Instigator = GetInstigator();
SpawnInfo.ObjectFlags |= RF_Transient;
UE_LOG(LogTemp, Warning, TEXT("SpawnPlayerCamera"));
if (APawn* MyPawn = GetPawn())
{
FTransform SpawnTransform = FTransform();
SpawnTransform.SetLocation(MyPawn->GetActorLocation());
OutContextPlayerCamera = GetWorld()->SpawnActor<AActor>(ADefaultPlayerCamera::StaticClass(), SpawnTransform, SpawnInfo);
if (OutContextPlayerCamera)
{
GetPlayerState<ADefaultPlayerState>()->SetPlayerCamera(OutContextPlayerCamera);
OutContextPlayerCamera->AttachToActor(GetPawn(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, EAttachmentRule::KeepWorld, false));
UE_LOG(LogTemp, Warning, TEXT("SetPlayerCamera Success : %s, %d"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName(), GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera());
}
else
{
UE_LOG(LogTemp, Error, TEXT("Camera Spawn Failed."));
}
}
}
void ADefaultPlayerController::SetACharacterOutlineColor(ACharacter* Target, bool Visible)
{
if (!HasAuthority())
{
if (ADefaultPlayerState* State = Target->GetPlayerState<ADefaultPlayerState>())
{
if (State->GetTeam() == GetPlayerState<ADefaultPlayerState>()->GetTeam())
{
Target->GetMesh()->SetRenderCustomDepth(Visible);
Target->GetMesh()->CustomDepthStencilValue = 1;
}
else
{
Target->GetMesh()->SetRenderCustomDepth(Visible);
Target->GetMesh()->CustomDepthStencilValue = 2;
}
}
else
{
UE_LOG(LogTemp, Error, TEXT("GetPlayerState<ADefaultPlayerState> Failed"));
}
}
}
ADefaultPlayerController::ADefaultPlayerController()
{
MouseClickInterval = 0.2;
PrimaryActorTick.bCanEverTick = true;
AutoManageActiveCameraTarget(false);
DefaultMouseCursor = EMouseCursor::Crosshairs;
static ConstructorHelpers::FObjectFinder<UInputMappingContext>
DEFAULT_CONTEXT(TEXT("/Script/EnhancedInput.InputMappingContext'/Game/InputActions/InputMappingContext.InputMappingContext'"));
if (!DEFAULT_CONTEXT.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("DEFAULT_CONTEXT load failed."));
return;
}
static ConstructorHelpers::FObjectFinder<UInputAction>
IA_SKILL1(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill1.Skill1'")),
IA_SKILL2(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill2.Skill2'")),
IA_SKILL3(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill3.Skill3'")),
IA_SKILL4(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Skill4.Skill4'")),
IA_RUNESPELL1(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/RuneSpell1.RuneSpell1'")),
IA_RUNESPELL2(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/RuneSpell2.RuneSpell2'")),
IA_WARD(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Ward.Ward'")),
IA_BOMB(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Bomb.Bomb'")),
IA_OBJECTSELECT(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/ObjectSelect.ObjectSelect'")),
IA_MOVE(TEXT("/Script/EnhancedInput.InputAction'/Game/InputActions/Move.Move'"));
if (!IA_SKILL1.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_SKILL1 load failed."));
return;
}
if (!IA_SKILL2.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_SKILL2 load failed."));
return;
}
if (!IA_SKILL3.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_SKILL3 load failed."));
return;
}
if (!IA_SKILL4.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_ULTIMATESKILL load failed."));
return;
}
if (!IA_RUNESPELL1.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_RUNESPELL1 load failed."));
return;
}
if (!IA_RUNESPELL2.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_RUNESPELL2 load failed."));
return;
}
if (!IA_WARD.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_WARD load failed."));
return;
}
if (!IA_BOMB.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_BOMB load failed."));
return;
}
if (!IA_OBJECTSELECT.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_OBJECTSELECT load failed."));
return;
}
if (!IA_MOVE.Succeeded())
{
UE_LOG(LogTemp, Error, TEXT("IA_MOVE load failed."));
return;
}
PlayerInputMapping = DEFAULT_CONTEXT.Object;
Skill1Action = IA_SKILL1.Object;
Skill2Action = IA_SKILL2.Object;
Skill3Action = IA_SKILL3.Object;
Skill4Action = IA_SKILL4.Object;
RuneSpell1Action = IA_RUNESPELL1.Object;
RuneSpell2Action = IA_RUNESPELL2.Object;
WardAction = IA_WARD.Object;
BombAction = IA_BOMB.Object;
ObjectSelectAction = IA_OBJECTSELECT.Object;
MoveAction = IA_MOVE.Object;
}
void ADefaultPlayerController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void ADefaultPlayerController::SetupInputComponent()
{
Super::SetupInputComponent();
if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(InputComponent))
{
EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1);
EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2);
EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3);
EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4);
EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1);
EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2);
EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward);
EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb);
EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect);
EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::MoveTriggered);
EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Started, this, &ADefaultPlayerController::MoveStarted);
}
}
void ADefaultPlayerController::Skill1()
{
UE_LOG(LogTemp, Warning, TEXT("Skill1"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill1);
}
void ADefaultPlayerController::Skill2()
{
UE_LOG(LogTemp, Warning, TEXT("Skill2"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill2);
}
void ADefaultPlayerController::Skill3()
{
UE_LOG(LogTemp, Warning, TEXT("Skill3"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill3);
}
void ADefaultPlayerController::Skill4()
{
UE_LOG(LogTemp, Warning, TEXT("Skill4"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4);
}
void ADefaultPlayerController::RuneSpell1()
{
UE_LOG(LogTemp, Warning, TEXT("RuneSpell1"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::RuneSpell1);
}
void ADefaultPlayerController::RuneSpell2()
{
UE_LOG(LogTemp, Warning, TEXT("RuneSpell2"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::RuneSpell2);
}
void ADefaultPlayerController::Ward()
{
UE_LOG(LogTemp, Warning, TEXT("Ward"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Ward);
}
void ADefaultPlayerController::Bomb()
{
UE_LOG(LogTemp, Warning, TEXT("Bomb"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Bomb);
}
void ADefaultPlayerController::ObjectSelect()
{
FHitResult HitResult;
TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;
ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldStatic));
ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn));
GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult);
if (ACharacter* HitObject = Cast<ACharacter>(HitResult.GetActor()))
{
UE_LOG(LogTemp, Warning, TEXT("%s"), *HitObject->GetName());
SetACharacterOutlineColor(HitObject, true);
}
}
void ADefaultPlayerController::MoveTriggered()
{
Move();
}
void ADefaultPlayerController::MoveStarted()
{
Move();
}
void ADefaultPlayerController::Move()
{
FHitResult HitResult;
GetHitResultUnderCursor(ECollisionChannel::ECC_Visibility, true, HitResult);
HitResult.Location.Z = 0;
UE_LOG(LogTemp, Warning, TEXT("Client%d MoveTo : (%f, %f)"), GPlayInEditorID, HitResult.Location.X, HitResult.Location.Y);
FVector ActorLocation = GetPawn()->GetActorLocation();
ActorLocation.Z = 0;
float CapsuleRadius = GetPawn<ACharacter>()->GetCapsuleComponent()->GetScaledCapsuleRadius();
FVector Destination = (HitResult.Location - ActorLocation).GetSafeNormal() * CapsuleRadius + HitResult.Location;
DrawDebugLine(GetWorld(), ActorLocation, HitResult.Location, FColor::Blue, false, 1, 0, 1);
DrawDebugLine(GetWorld(), HitResult.Location, Destination, FColor::Emerald, false, 1, 0, 1);
const UWorld* CurrentWorld = GetWorld();
if (CurrentWorld)
{
FHitResult CollisionCheck;
FCollisionQueryParams CollisionParams;
CollisionParams.AddIgnoredActor(GetPawn());
FVector Start = HitResult.Location;
FVector End = Destination;
if (CurrentWorld->LineTraceSingleByChannel(CollisionCheck, Start, End, ECC_Visibility, CollisionParams))
{
DrawDebugLine(CurrentWorld, Start, End, FColor::Red, false, 1.5, 0, 2);
Destination = HitResult.Location;
}
}
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
SimpleMoveToLocation(this, Destination);
this->MoveToLocation(Destination);
}
void ADefaultPlayerController::SimpleMoveToLocation(AController* Controller, const FVector& GoalLocation)
{
UNavigationSystemV1* NavSys = Controller ? FNavigationSystem::GetCurrent<UNavigationSystemV1>(Controller->GetWorld()) : nullptr;
if (NavSys == nullptr || Controller == nullptr || Controller->GetPawn() == nullptr)
{
UE_LOG(LogNavigation, Warning, TEXT("UNavigationSystemV1::SimpleMoveToActor called for NavSys:%s Controller:%s controlling Pawn:%s (if any of these is None then there's your problem"),
*GetNameSafe(NavSys), *GetNameSafe(Controller), Controller ? *GetNameSafe(Controller->GetPawn()) : TEXT("NULL"));
return;
}
AAIController* AsAIController = Cast<AAIController>(Controller);
UPathFollowingComponent* PFollowComp = nullptr;
if (AsAIController)
{
PFollowComp = AsAIController->GetPathFollowingComponent();
}
else
{
PFollowComp = Controller->FindComponentByClass<UPathFollowingComponent>();
if (PFollowComp == nullptr)
{
PFollowComp = NewObject<UPathFollowingComponent>(Controller);
PFollowComp->RegisterComponentWithWorld(Controller->GetWorld());
PFollowComp->Initialize();
PFollowComp->OnRequestFinished.AddUObject(this, &ADefaultPlayerController::OnMoveCompleted);
}
}
if (PFollowComp == nullptr)
{
return;
}
if (!PFollowComp->IsPathFollowingAllowed())
{
return;
}
const bool bAlreadyAtGoal = PFollowComp->HasReached(GoalLocation, EPathFollowingReachMode::OverlapAgent);
// script source, keep only one move request at time
if (PFollowComp->GetStatus() != EPathFollowingStatus::Idle)
{
PFollowComp->AbortMove(*NavSys, FPathFollowingResultFlags::ForcedScript | FPathFollowingResultFlags::NewRequest
, FAIRequestID::AnyRequest, bAlreadyAtGoal ? EPathFollowingVelocityMode::Reset : EPathFollowingVelocityMode::Keep);
}
// script source, keep only one move request at time
if (PFollowComp->GetStatus() != EPathFollowingStatus::Idle)
{
PFollowComp->AbortMove(*NavSys, FPathFollowingResultFlags::ForcedScript | FPathFollowingResultFlags::NewRequest);
}
if (bAlreadyAtGoal)
{
PFollowComp->RequestMoveWithImmediateFinish(EPathFollowingResult::Success);
}
else
{
const FVector AgentNavLocation = Controller->GetNavAgentLocation();
const ANavigationData* NavData = NavSys->GetNavDataForProps(Controller->GetNavAgentPropertiesRef(), AgentNavLocation);
if (NavData)
{
FPathFindingQuery Query(Controller, *NavData, AgentNavLocation, GoalLocation);
FPathFindingResult Result = NavSys->FindPathSync(Query);
if (Result.IsSuccessful())
{
PFollowComp->RequestMove(FAIMoveRequest(GoalLocation), Result.Path);
}
else if (PFollowComp->GetStatus() != EPathFollowingStatus::Idle)
{
PFollowComp->RequestMoveWithImmediateFinish(EPathFollowingResult::Invalid);
}
}
}
}
void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& MovementResult)
{
if (MovementResult.IsSuccess())
{
if (!GPlayInEditorID)
{
UE_LOG(LogTemp, Warning, TEXT("Server MoveCompleted"));
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Client%d MoveCompleted"), GPlayInEditorID);
}
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Idle);
}
}
void ADefaultPlayerController::Attack()
{
UE_LOG(LogTemp, Warning, TEXT("Attack"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Attack);
}
void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location)
{
SimpleMoveToLocation(this, Location);
}

View File

@@ -0,0 +1,84 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "InputMappingContext.h"
#include "Net/UnrealNetwork.h"
#include "AIController.h"
#include "DefaultPlayerController.generated.h"
UCLASS()
class PROMETHER_API ADefaultPlayerController : public APlayerController
{
GENERATED_BODY()
protected:
virtual void BeginPlay() override;
virtual void OnPossess(APawn* aPawn) override;
virtual void OnUnPossess() override;
UFUNCTION(Server, Reliable)
void Server_SpawnPlayerCamera();
void SetACharacterOutlineColor(ACharacter* Target, bool Visible);
public:
ADefaultPlayerController();
virtual void Tick(float DeltaTime) override;
virtual void SetupInputComponent() override;
void Skill1();
void Skill2();
void Skill3();
void Skill4();
void RuneSpell1();
void RuneSpell2();
void Ward();
void Bomb();
void ObjectSelect();
void MoveTriggered();
void MoveStarted();
void Move();
UFUNCTION(Server, Reliable)
void MoveToLocation(FVector Location);
UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
void SimpleMoveToLocation(AController* Controller, const FVector& Goal);
void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult &MovementResult);
void Attack();
UPROPERTY(BlueprintReadWrite)
float MouseClickInterval;
private:
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputMappingContext> PlayerInputMapping;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> Skill1Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> Skill2Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> Skill3Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> Skill4Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> RuneSpell1Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> RuneSpell2Action;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> WardAction;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> BombAction;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> ObjectSelectAction;
UPROPERTY(EditAnywhere, Category = "Input")
TSoftObjectPtr<UInputAction> MoveAction;
};

View File

@@ -0,0 +1,99 @@
#include "DefaultPlayerState.h"
#include "Net/UnrealNetwork.h"
ADefaultPlayerState::ADefaultPlayerState()
{
CharacterBPRef = nullptr;;
Team = TeamType::Null;
State = ECharacterState::Idle;
}
void ADefaultPlayerState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(ADefaultPlayerState, CharacterBPRef);
DOREPLIFETIME(ADefaultPlayerState, Team);
DOREPLIFETIME(ADefaultPlayerState, CooldownDuration);
DOREPLIFETIME(ADefaultPlayerState, Stats);
DOREPLIFETIME(ADefaultPlayerState, MaxStats);
DOREPLIFETIME(ADefaultPlayerState, State);
DOREPLIFETIME(ADefaultPlayerState, AttackType);
//DOREPLIFETIME(ADefaultPlayerState, StatusEffectObject);
DOREPLIFETIME(ADefaultPlayerState, PlayerCamera);
}
void ADefaultPlayerState::InitPlayerStats()
{
ADefaultPlayerCharacter* Initializer = Cast<ADefaultPlayerCharacter>(CharacterBPRef);
Stats.Health = Initializer->GetHealth();
Stats.HPRegeneration = Initializer->GetHPRegeneration();
Stats.HealAndShieldpower = Initializer->GetHealAndShieldpower();
Stats.Armor = Initializer->GetArmor();
Stats.MagicResistance = Initializer->GetMagicResistance();
Stats.Tenacity = Initializer->GetTenacity();
Stats.SlowRisist = Initializer->GetSlowRisist();
Stats.AttackSpeed = Initializer->GetAttackSpeed();
Stats.AttackDamage = Initializer->GetAttackDamage();
Stats.AbilityPower = Initializer->GetAbilityPower();
Stats.CriticalStrikeChance = Initializer->GetCriticalStrikeChance();
Stats.CriticalStrikeDamage = Initializer->GetCriticalStrikeDamage();
Stats.ArmorPenetration = Initializer->GetArmorPenetration();
Stats.MagicPenetration = Initializer->GetMagicPenetration();
Stats.LifeSteal = Initializer->GetLifeSteal();
Stats.PhysicalVamp = Initializer->GetPhysicalVamp();
Stats.Omnivamp = Initializer->GetOmnivamp();
Stats.AbilityHaste = Initializer->GetAbilityHaste();
SetMultipleCooldownDuration(Initializer->GetCooldownDuration());
Stats.Mana = Initializer->GetMana();
Stats.ManaRegeneration = Initializer->GetManaRegeneration();
Stats.Energy = Initializer->GetEnergy();
Stats.EnergyRegeneration = Initializer->GetEnergyRegeneration();
Stats.AttackRange = Initializer->GetAttackRange();
Stats.MovementSpeed = Initializer->GetMovementSpeed();
Stats.GoldGeneration = Initializer->GetGoldGeneration();
Stats.AttackDamageGrowth = Initializer->GetAttackDamageGrowth();
Stats.AttackSpeedGrowth = Initializer->GetAttackSpeedGrowth();
Stats.ArmorGrowth = Initializer->GetArmorGrowth();
Stats.MagicResistanceGrowth = Initializer->GetMagicResistanceGrowth();
Stats.HealthGrowth = Initializer->GetHealthGrowth();
Stats.HealthRegenerationGrowth = Initializer->GetHealthRegenerationGrowth();
Stats.ManaGrowth = Initializer->GetManaGrowth();
Stats.ManaRegenerationGrowth = Initializer->GetManaRegenerationGrowth();
}
void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value)
{
AttackType = Value;
}
void ADefaultPlayerState::NetMulticast_SetState_Implementation(ECharacterState Value)
{
State = Value;
}
void ADefaultPlayerState::SetState_Implementation(ECharacterState Value)
{
NetMulticast_SetState(Value);
}
void ADefaultPlayerState::SetAttackType_Implementation(CooldownType Value)
{
NetMulticast_SetAttackType(Value);
}
int32 ADefaultPlayerState::GetCharacterLevel() const
{
return int32();
}
void ADefaultPlayerState::SetMultipleCooldownDuration(const float* Value)
{
std::memcpy(&CooldownDuration, Value, sizeof(float) * (uint8)CooldownType::SIZE);
}

View File

@@ -0,0 +1,88 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerState.h"
#include <iostream>
#include <map>
#include "../PrometherEnum.h"
#include "DefaultPlayerCharacter.h"
#include "../StatusEffect/StatusEffect.h"
#include "DefaultPlayerState.generated.h"
UCLASS()
class PROMETHER_API ADefaultPlayerState : public APlayerState
{
GENERATED_BODY()
public:
ADefaultPlayerState();
void GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const override;
void InitPlayerStats();
void SetCharacterBPRef(UClass* Value) { CharacterBPRef = Value; }
UClass* GetCharacterBPRef() const { return CharacterBPRef; }
UFUNCTION(BlueprintCallable)
void SetTeam(TeamType Value) { Team = Value; }
UFUNCTION(BlueprintCallable)
TeamType GetTeam() const { return Team; }
void SetPlayerCamera(AActor* Actor) { PlayerCamera = Actor; }
AActor* GetPlayerCamera() const { return PlayerCamera; }
UFUNCTION(BlueprintCallable)
void SetCooldownDuration(CooldownType Key, float Value) { CooldownDuration[(uint8)Key] = Value; }
UFUNCTION(BlueprintCallable)
float GetCooldownDuration(CooldownType Key) const { return CooldownDuration[(uint8)Key]; }
//Execute on server
UFUNCTION(BlueprintCallable, Server, Reliable)
void SetState(ECharacterState Value);
UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
void NetMulticast_SetState(ECharacterState Value);
UFUNCTION(BlueprintCallable)
ECharacterState GetState() const { return State; }
//Execute on server
UFUNCTION(BlueprintCallable, Server, Reliable)
void SetAttackType(CooldownType Value);
UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
void NetMulticast_SetAttackType(CooldownType Value);
UFUNCTION(BlueprintCallable)
CooldownType GetAttackType() const { return AttackType; }
UFUNCTION(BlueprintCallable)
int32 GetCharacterLevel() const;
//Should be ONLY executed on server!!
void SetMultipleCooldownDuration(const float* Value) ;
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite)
FDefaultStats Stats;
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite)
FDefaultStats MaxStats;
private:
UPROPERTY(Replicated, Transient)
UClass* CharacterBPRef;
UPROPERTY(Replicated, Transient)
TeamType Team;
UPROPERTY(Replicated, Transient)
float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, };
UPROPERTY(Replicated, Transient)
ECharacterState State;
UPROPERTY(Replicated, Transient)
CooldownType AttackType;
//UPROPERTY(Replicated, Transient)
//TMap<FUniqueObjectID, UStatusEffect> StatusEffectObject;
UPROPERTY(Replicated, Transient)
AActor* PlayerCamera;
};

View File

@@ -0,0 +1,23 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class Promether : ModuleRules
{
public Promether(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput", "AIModule", "NavigationSystem", "OnlineSubsystem" });
PrivateDependencyModuleNames.AddRange(new string[] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}

View File

@@ -0,0 +1,6 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "Promether.h"
#include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Promether, "Promether" );

View File

@@ -0,0 +1,6 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"

View File

@@ -0,0 +1,91 @@
#pragma once
#include "CoreMinimal.h"
#include "DamageType/BaseAttack.h"
#include "DefaultStats.h"
UENUM(BlueprintType)
enum class CharacterType : uint8
{
Lukriel,
Allium,
Riana,
Lb,
SIZE
};
/*UENUM <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (const UEnum* CharStateEnum = FindObject<UEnum>(ANY_PACKAGE, TEXT("CharacterType"), true))
{
UE_LOG(LogTemp, Warning, TEXT("%s"), *CharStateEnum->GetNameByValue((uint8)Type).ToString());
}
*/
UENUM(BlueprintType)
enum class TeamType : uint8
{
Null,
Neutral,
Black,
White
};
UENUM(BlueprintType)
enum class CooldownType : uint8
{
Skill1,
Skill2,
Skill3,
Skill4,
RuneSpell1,
RuneSpell2,
Ward,
Bomb,
Move,
Attack,
SIZE
};
enum class CCType : uint32
{
None = 0x00000000,
Slow = 0x00000001,
Cripple = 0x00000002,
Silence = 0x00000004,
Blind = 0x00000008,
BlockedSight = 0x00000010,
Grounding = 0x00000020,
Polymorph = 0x00000040,
Disarmed = 0x00000080,
Kinematic = 0x00000100,
Knockdown = 0x00000200,
Root = 0x00000400,
Stun = 0x00000800,
Airbone = 0x00001000,
Knockback = 0x00002000,
Grab = 0x00004000,
Suspension = 0x00008000,
Taunt = 0x00010000,
Charm = 0x00020000,
Flee = 0x00040000,
Suppressed = 0x00080000,
Banishment = 0x00100000,
Sleep = 0x00200000
};
UENUM(BlueprintType)
enum class ECharacterState : uint8
{
Idle,
Moving,
Attack,
Dead,
SIZE
};
struct FUniqueObjectID
{
double ConstructTime;
int32 RandomUniqueNumber;
};

View File

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

View File

@@ -0,0 +1,19 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "StatusEffect.generated.h"
/**
*
*/
UCLASS()
class PROMETHER_API UStatusEffect : public UObject
{
GENERATED_BODY()
public:
};

View File

@@ -0,0 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class PrometherEditorTarget : TargetRules
{
public PrometherEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
ExtraModuleNames.Add("Promether");
}
}

View File

@@ -0,0 +1,15 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.Collections.Generic;
public class PrometherServerTarget : TargetRules
{
public PrometherServerTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Server;
DefaultBuildSettings = BuildSettingsVersion.V2;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;
ExtraModuleNames.Add("Promether");
}
}