LEAP Documentation 40220
Documentation for the LEAP project
SpawnInterface.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2022. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Interface.h"
7#include "SpawnInterface.generated.h"
8
9DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpawnProgressSignature, UObject*, Spawner);
10DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpawnEventCompleteSignature,bool, bSuccess);
11
12class AWaveSpawner;
14
15// This class does not need to be modified.
16UINTERFACE(MinimalAPI, BlueprintType)
17class USpawnInterface : public UInterface
18{
19 GENERATED_BODY()
20
21};
22
23class PROJECTX_API ISpawnInterface
24{
25 GENERATED_BODY()
26
27 FSpawnProgressSignature OnSpawningComplete;
28 FSpawnEventCompleteSignature OnEventComplete;
29
30public:
31 UFUNCTION(BlueprintCallable, BlueprintNativeEvent, meta=(DisplayName="BeginSpawningWithOverrideParams"))
32 void K2_BeginSpawning(const TArray<TSubclassOf<AActor>>& SpawnOverrideList);
33 UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
34 void BeginSpawning();
35 UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
36 void StopSpawning();
37 UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
38 TArray<TScriptInterface<ISpawnInterface>> GetSpawnChildren();
39
40 virtual bool IsAnObjective() const {return false;}
41 virtual AProjectXSpawnerObjective* GetObjective() { return nullptr; }
42 virtual bool ImplementsSpawnCompleteCallback() const { return false; }
43 virtual FSpawnProgressSignature& GetSpawnCompleteEvent() { return OnSpawningComplete; }
44 virtual FSpawnEventCompleteSignature& GetEventCompleteEvent() { return OnEventComplete; }
45};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpawnProgressSignature, UObject *, Spawner)
Definition: ProjectXSpawnerObjective.h:53
Definition: WaveSpawner.h:115
Definition: SpawnInterface.h:24
virtual FSpawnProgressSignature & GetSpawnCompleteEvent()
Definition: SpawnInterface.h:43
virtual bool ImplementsSpawnCompleteCallback() const
Definition: SpawnInterface.h:42
virtual FSpawnEventCompleteSignature & GetEventCompleteEvent()
Definition: SpawnInterface.h:44
virtual AProjectXSpawnerObjective * GetObjective()
Definition: SpawnInterface.h:41
Definition: SpawnInterface.h:18