mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-13 16:12:23 -07:00
ac90ba6ab6
CogSample: Add area of effect CogSample: Add "Easy" cheat CogWindow: Fix some tooltips CogEngine: Spawns now spawn the default controller CogDebug: Early out on DebugDraw if WorldContextObject is null
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CogSampleDamageableInterface.generated.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
USTRUCT(BlueprintType)
|
|
struct FCogSampleDamageEventParams
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UPROPERTY(BlueprintReadWrite)
|
|
float MitigatedDamage = 0;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
float UnmitigatedDamage = 0;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
AActor* DamageDealer = nullptr;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
AActor* DamageReceiver = nullptr;
|
|
};
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FCogSampleDamageEventDelegate, const FCogSampleDamageEventParams&, Params);
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
UINTERFACE(MinimalAPI, Blueprintable)
|
|
class UCogSampleDamageableInterface : public UInterface
|
|
{
|
|
GENERATED_BODY()
|
|
};
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------
|
|
class ICogSampleDamageableInterface
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
virtual void HandleDamageReceived(const FCogSampleDamageEventParams& Params) {}
|
|
|
|
virtual void HandleDamageDealt(const FCogSampleDamageEventParams& Params) {}
|
|
|
|
virtual bool IsDead() const { return false; }
|
|
|
|
};
|