rename CogInterfaces to CogInterface

This commit is contained in:
Arnaud Jamin
2023-10-02 23:49:10 -04:00
parent 771963f7c2
commit bd6c7be5ca
21 changed files with 60 additions and 60 deletions
@@ -0,0 +1,44 @@
using UnrealBuildTool;
public class CogInterface : ModuleRules
{
public CogInterface(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string[] {
}
);
PrivateIncludePaths.AddRange(
new string[] {
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
}
);
}
}
@@ -0,0 +1,17 @@
#include "CogInterfaceModule.h"
#define LOCTEXT_NAMESPACE "FCogInterfacesModule"
//--------------------------------------------------------------------------------------------------------------------------
void FCogInterfaceModule::StartupModule()
{
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogInterfaceModule::ShutdownModule()
{
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FCogInterfaceModule, CogInterface)
@@ -0,0 +1,29 @@
#pragma once
#include "CoreMinimal.h"
#include "CogInterfaceAllegianceActor.generated.h"
//--------------------------------------------------------------------------------------------------------------------------
UENUM(BlueprintType)
enum class ECogInterfacesAllegiance : uint8
{
Ally,
Enemy
};
//--------------------------------------------------------------------------------------------------------------------------
UINTERFACE(MinimalAPI, Blueprintable)
class UCogInterfacesAllegianceActor : public UInterface
{
GENERATED_BODY()
};
//--------------------------------------------------------------------------------------------------------------------------
class ICogInterfacesAllegianceActor
{
GENERATED_BODY()
public:
virtual ECogInterfacesAllegiance GetAllegiance(const AActor* OtherActor) const = 0;
};
@@ -0,0 +1,46 @@
#pragma once
#include "CoreMinimal.h"
#include "CogInterfaceDamageActor.generated.h"
//--------------------------------------------------------------------------------------------------------------------------
UENUM(BlueprintType)
enum class ECogInterfaceDamageEventType : uint8
{
DamageDealt,
DamageReceived,
};
//--------------------------------------------------------------------------------------------------------------------------
USTRUCT()
struct FCogInterfaceDamageParams
{
GENERATED_BODY()
ECogInterfaceDamageEventType Type;
TObjectPtr<AActor> DamageDealer;
TObjectPtr<AActor> DamageReceiver;
float MitigatedDamage = 0;
float IncomingDamage = 0;
bool IsCritical = false;
};
//--------------------------------------------------------------------------------------------------------------------------
DECLARE_MULTICAST_DELEGATE_OneParam(FCogInterfaceOnDamageEvent, const FCogInterfaceDamageParams&);
//--------------------------------------------------------------------------------------------------------------------------
UINTERFACE(MinimalAPI, Blueprintable)
class UCogInterfaceDamageActor : public UInterface
{
GENERATED_BODY()
};
//--------------------------------------------------------------------------------------------------------------------------
class ICogInterfaceDamageActor
{
GENERATED_BODY()
public:
virtual FCogInterfaceOnDamageEvent& OnDamageEvent() = 0;
};
@@ -0,0 +1,17 @@
#pragma once
#include "CoreMinimal.h"
#include "CogInterfaceFilteredActor.generated.h"
UINTERFACE(MinimalAPI, Blueprintable)
class UCogInterfacesFilteredActor : public UInterface
{
GENERATED_BODY()
};
class ICogInterfacesFilteredActor
{
GENERATED_BODY()
virtual bool IsActorFilteringDebug() const { return true; }
};
@@ -0,0 +1,17 @@
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
class COGINTERFACE_API FCogInterfaceModule : public IModuleInterface
{
public:
static inline FCogInterfaceModule& Get() { return FModuleManager::LoadModuleChecked<FCogInterfaceModule>("CogInterface"); }
virtual void StartupModule() override;
virtual void ShutdownModule() override;
private:
};