LEAP Documentation 40220
Documentation for the LEAP project
PawnHealthMutator.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "GameFramework/MutatorComponent.h"
7#include "PawnHealthMutator.generated.h"
8
9class APawn;
10
11USTRUCT(Blueprintable)
13{
14 GENERATED_USTRUCT_BODY()
15
16public:
17 UPROPERTY()
18 TSubclassOf<APawn> PawnClass = NULL;
19 UPROPERTY()
20 float Health = -1.f;
21};
22
23
27UCLASS(config = Game, NotBlueprintable)
28class PROJECTX_API UPawnHealthMutator : public UMutatorComponent
29{
30 GENERATED_UCLASS_BODY()
31
32protected:
33 virtual void BeginPlay() override;
34
35public:
36 virtual void ModifyPawn(APawn* Pawn) override;
37
38 FORCEINLINE bool IsEnabled() const { return bEnableMutator; }
39
40protected:
41 UPROPERTY(globalconfig)
42 bool bEnableMutator = false;
43 UPROPERTY(config)
44 TArray<FPawnConfig> PawnConfig;
45 UPROPERTY()
46 TMap<TSubclassOf<APawn>, float> PawnMap;
47};
Definition: PawnHealthMutator.h:29
FORCEINLINE bool IsEnabled() const
Definition: PawnHealthMutator.h:38
Definition: PawnHealthMutator.h:13