LEAP Documentation 40220
Documentation for the LEAP project
WeaponDamageMutator.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 "WeaponDamageMutator.generated.h"
8
9class UDamageType;
10
11USTRUCT(Blueprintable)
13{
14 GENERATED_USTRUCT_BODY()
15
16public:
17 UPROPERTY()
18 TSubclassOf<UDamageType> DamageType = NULL;
19 UPROPERTY()
20 float Multiplier = 1.f;
21};
22
23UCLASS(config = Game, NotBlueprintable)
24class PROJECTX_API UWeaponDamageMutator : public UMutatorComponent
25{
26 GENERATED_UCLASS_BODY()
27
28protected:
29 virtual void BeginPlay() override;
30
31public:
32 virtual void ModifyDamage(AActor* Target, float& Damage, struct FDamageEvent const& DamageEvent, AController*& EventInstigator, AActor*& DamageCauser) override;
33
34 FORCEINLINE bool IsEnabled() const { return bEnableMutator; }
35
36protected:
37 UPROPERTY(globalconfig)
38 bool bEnableMutator = false;
39 UPROPERTY(config)
40 TArray<FDamageConfig> DamageConfig;
41 UPROPERTY()
42 TMap<TSubclassOf<UDamageType>, float> DamageMap;
43};
Definition: WeaponDamageMutator.h:25
FORCEINLINE bool IsEnabled() const
Definition: WeaponDamageMutator.h:34
Definition: WeaponDamageMutator.h:13