mirror of
https://github.com/Ed94/Cog.git
synced 2026-06-23 12:24:59 -07:00
starting to add the hud in the sample
This commit is contained in:
@@ -2,11 +2,16 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "AbilitySystemInterface.h"
|
||||
#include "CogSampleDamageEvent.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "CogSamplePlayerController.generated.h"
|
||||
|
||||
class UCogSampleTargetAcquisition;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FCogSampleTargetChangedEventDelegate, ACogSamplePlayerController*, Controller, AActor*, NewTarget, AActor*, OldTarget);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
UCLASS(config=Game)
|
||||
class ACogSamplePlayerController : public APlayerController
|
||||
{
|
||||
@@ -22,12 +27,25 @@ public:
|
||||
|
||||
virtual void Tick(float DeltaSeconds);
|
||||
|
||||
void SetTarget(AActor* Value);
|
||||
|
||||
AActor* GetTarget() const { return Target.Get(); }
|
||||
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FCogSampleTargetChangedEventDelegate OnTargetChanged;
|
||||
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FCogSampleDamageEventDelegate OnPawnDealtDamage;
|
||||
|
||||
private:
|
||||
|
||||
UFUNCTION(Reliable, Server)
|
||||
void Server_SetTarget(AActor* Value);
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = TargetAcquisition, meta = (AllowPrivateAccess = "true"))
|
||||
UCogSampleTargetAcquisition* TargetAcquisition = nullptr;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = TargetAcquisition, meta = (AllowPrivateAccess = "true"))
|
||||
TSoftObjectPtr<AActor> Target = nullptr;
|
||||
TWeakObjectPtr<AActor> Target = nullptr;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user