mirror of
https://github.com/Ed94/Cog.git
synced 2026-09-01 14:00:08 +00:00
Add CogInterfaces plugin to fix interface usage when compiling shipping builds
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CogAbilityDamageActorInterface.generated.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
USTRUCT()
|
||||
struct COGABILITY_API FCogAbilityDamageParams
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
TObjectPtr<AActor> DamageDealer;
|
||||
TObjectPtr<AActor> DamageReceiver;
|
||||
float ReceivedDamage = 0;
|
||||
float IncomingDamage = 0;
|
||||
bool IsCritical = false;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FCogAbilityOnDamageEvent, const FCogAbilityDamageParams&);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UINTERFACE(MinimalAPI, Blueprintable)
|
||||
class UCogAbilityDamageActorInterface : public UInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
class ICogAbilityDamageActorInterface
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
virtual FCogAbilityOnDamageEvent& OnDamageEvent() = 0;
|
||||
};
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "CogWindow.h"
|
||||
#include "CogAbilityWindow_Damages.generated.h"
|
||||
|
||||
struct FCogAbilityDamageParams;
|
||||
struct FCogInterfacesDamageParams;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
class FCogDamageInstance
|
||||
@@ -52,17 +52,19 @@ class COGABILITY_API UCogAbilityWindow_Damages : public UCogWindow
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UCogAbilityWindow_Damages();
|
||||
virtual void RenderContent() override;
|
||||
virtual void RenderTick(float DeltaSeconds) override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void RenderContent() override;
|
||||
|
||||
virtual void GameTick(float DeltaSeconds) override;
|
||||
|
||||
virtual void OnSelectionChanged(AActor* OldSelection, AActor* NewSelection) override;
|
||||
|
||||
private:
|
||||
|
||||
UFUNCTION()
|
||||
void OnDamageEvent(const FCogAbilityDamageParams& Params);
|
||||
void OnDamageEvent(const FCogInterfacesDamageParams& Params);
|
||||
|
||||
FCogDamageStats DamageDealtStats;
|
||||
FCogDamageStats DamageReceivedStats;
|
||||
|
||||
Reference in New Issue
Block a user