RealtimeStyleTransferRuntime/Source/LyraGame/Teams/LyraTeamStatics.h

42 lines
1.7 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
2022-09-13 07:18:28 +00:00
#include "HAL/Platform.h"
2022-05-23 18:41:30 +00:00
#include "Kismet/BlueprintFunctionLibrary.h"
2022-09-13 07:18:28 +00:00
#include "Math/Color.h"
#include "UObject/NameTypes.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "LyraTeamStatics.generated.h"
class ULyraTeamDisplayAsset;
2022-09-13 07:18:28 +00:00
class UObject;
class UTexture;
struct FFrame;
2022-05-23 18:41:30 +00:00
/** A subsystem for easy access to team information for team-based actors (e.g., pawns or player states) */
UCLASS()
class ULyraTeamStatics : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
// Returns the team this object belongs to, or INDEX_NONE if it is not part of a team
UFUNCTION(BlueprintCallable, Category=Teams, meta=(Keywords="GetTeamFromObject", DefaultToSelf="Agent", AdvancedDisplay="bLogIfNotSet"))
static void FindTeamFromObject(const UObject* Agent, bool& bIsPartOfTeam, int32& TeamId, ULyraTeamDisplayAsset*& DisplayAsset, bool bLogIfNotSet = false);
UFUNCTION(BlueprintCallable, Category=Teams, meta=(WorldContext="WorldContextObject"))
static ULyraTeamDisplayAsset* GetTeamDisplayAsset(const UObject* WorldContextObject, int32 TeamId);
UFUNCTION(BlueprintCallable, Category = Teams)
static float GetTeamScalarWithFallback(ULyraTeamDisplayAsset* DisplayAsset, FName ParameterName, float DefaultValue);
UFUNCTION(BlueprintCallable, Category = Teams)
static FLinearColor GetTeamColorWithFallback(ULyraTeamDisplayAsset* DisplayAsset, FName ParameterName, FLinearColor DefaultValue);
UFUNCTION(BlueprintCallable, Category = Teams)
static UTexture* GetTeamTextureWithFallback(ULyraTeamDisplayAsset* DisplayAsset, FName ParameterName, UTexture* DefaultValue);
};