55 lines
1.8 KiB
C++
Executable file
55 lines
1.8 KiB
C++
Executable file
#pragma once
|
|
#include "CoreMinimal.h"
|
|
#include "Objective.h"
|
|
#include "KillEnemiesObjective.generated.h"
|
|
|
|
class APawn;
|
|
class UDebrisPositioning;
|
|
class UEnemyDescriptor;
|
|
class UHealthComponentBase;
|
|
|
|
UCLASS(Abstract, Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
|
|
class UKillEnemiesObjective : public UObjective {
|
|
GENERATED_BODY()
|
|
public:
|
|
protected:
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
int32 EnemyCount;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
int32 ExtraEnemies;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
|
|
UDebrisPositioning* Positioning;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
|
|
UEnemyDescriptor* EnemyTarget;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_EnemiesKilled, meta=(AllowPrivateAccess=true))
|
|
int32 EnemiesKilled;
|
|
|
|
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_EnemiesToKill, meta=(AllowPrivateAccess=true))
|
|
int32 EnemiesToKill;
|
|
|
|
public:
|
|
UKillEnemiesObjective();
|
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
|
|
|
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable, BlueprintPure=false)
|
|
void RegisterTargetSpawned(APawn* Target) const;
|
|
|
|
protected:
|
|
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
|
|
void ReceiveTargetKilled(UHealthComponentBase* Health);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnTargetKilled(UHealthComponentBase* Health);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_EnemiesToKill(int32 prevAmount);
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void OnRep_EnemiesKilled(int32 prevAmount);
|
|
|
|
};
|
|
|