Download LyraStarterGame/Source/LyraGame/Weapons/LyraDamageLogDebuggerComponent.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Weapons/LyraDamageLogDebuggerComponent.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Weapons/LyraDamageLogDebuggerComponent.h
-
curl -L -o LyraDamageLogDebuggerComponent.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Weapons/LyraDamageLogDebuggerComponent.h
1.28 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| namespace EEndPlayReason { enum Type : int; } | |
| class UObject; | |
| struct FGameplayTag; | |
| struct FLyraVerbMessage; | |
| struct FFrameDamageEntry | |
| { | |
| int32 NumImpacts = 0; | |
| double SumDamage = 0.0; | |
| double TimeOfFirstHit = 0.0; | |
| }; | |
| UCLASS(Blueprintable, meta=(BlueprintSpawnableComponent)) | |
| class ULyraDamageLogDebuggerComponent : public UActorComponent | |
| { | |
| GENERATED_BODY() | |
| public: | |
| ULyraDamageLogDebuggerComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); | |
| virtual void BeginPlay() override; | |
| virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; | |
| virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; | |
| UPROPERTY(EditAnywhere) | |
| double SecondsBetweenDamageBeforeLogging = 1.0; | |
| private: | |
| FGameplayMessageListenerHandle ListenerHandle; | |
| double LastDamageEntryTime = 0.0; | |
| TMap<int64, FFrameDamageEntry> DamageLog; | |
| private: | |
| void OnDamageMessage(FGameplayTag Channel, const FLyraVerbMessage& Payload); | |
| }; | |