Download LyraStarterGame/Source/LyraGame/Player/LyraCheatManager.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Player/LyraCheatManager.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Player/LyraCheatManager.h
-
curl -L -o LyraCheatManager.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Player/LyraCheatManager.h
3.34 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class ULyraAbilitySystemComponent; | |
| DECLARE_LOG_CATEGORY_EXTERN(LogLyraCheat, Log, All); | |
| /** | |
| * ULyraCheatManager | |
| * | |
| * Base cheat manager class used by this project. | |
| */ | |
| UCLASS(config = Game, Within = PlayerController, MinimalAPI) | |
| class ULyraCheatManager : public UCheatManager | |
| { | |
| GENERATED_BODY() | |
| public: | |
| ULyraCheatManager(); | |
| virtual void InitCheatManager() override; | |
| // Helper function to write text to the console and to the log. | |
| static void CheatOutputText(const FString& TextToOutput); | |
| // Runs a cheat on the server for the owning player. | |
| UFUNCTION(exec) | |
| void Cheat(const FString& Msg); | |
| // Runs a cheat on the server for the all players. | |
| UFUNCTION(exec) | |
| void CheatAll(const FString& Msg); | |
| // Starts the next match | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| void PlayNextGame(); | |
| UFUNCTION(Exec) | |
| virtual void ToggleFixedCamera(); | |
| UFUNCTION(Exec) | |
| virtual void CycleDebugCameras(); | |
| UFUNCTION(Exec) | |
| virtual void CycleAbilitySystemDebug(); | |
| // Forces input activated abilities to be canceled. Useful for tracking down ability interruption bugs. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void CancelActivatedAbilities(); | |
| // Adds the dynamic tag to the owning player's ability system component. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void AddTagToSelf(FString TagName); | |
| // Removes the dynamic tag from the owning player's ability system component. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void RemoveTagFromSelf(FString TagName); | |
| // Applies the specified damage amount to the owning player. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void DamageSelf(float DamageAmount); | |
| // Applies the specified damage amount to the actor that the player is looking at. | |
| virtual void DamageTarget(float DamageAmount) override; | |
| // Applies the specified amount of healing to the owning player. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void HealSelf(float HealAmount); | |
| // Applies the specified amount of healing to the actor that the player is looking at. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void HealTarget(float HealAmount); | |
| // Applies enough damage to kill the owning player. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void DamageSelfDestruct(); | |
| // Prevents the owning player from taking any damage. | |
| virtual void God() override; | |
| // Prevents the owning player from dropping below 1 health. | |
| UFUNCTION(Exec, BlueprintAuthorityOnly) | |
| virtual void UnlimitedHealth(int32 Enabled = -1); | |
| protected: | |
| virtual void EnableDebugCamera() override; | |
| virtual void DisableDebugCamera() override; | |
| bool InDebugCamera() const; | |
| virtual void EnableFixedCamera(); | |
| virtual void DisableFixedCamera(); | |
| bool InFixedCamera() const; | |
| void ApplySetByCallerDamage(ULyraAbilitySystemComponent* LyraASC, float DamageAmount); | |
| void ApplySetByCallerHeal(ULyraAbilitySystemComponent* LyraASC, float HealAmount); | |
| ULyraAbilitySystemComponent* GetPlayerAbilitySystemComponent() const; | |
| }; | |