42 lines
1.7 KiB
C++
42 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "HAL/Platform.h"
|
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
#include "Math/Color.h"
|
|
#include "UObject/NameTypes.h"
|
|
#include "UObject/UObjectGlobals.h"
|
|
|
|
#include "LyraTeamStatics.generated.h"
|
|
|
|
class ULyraTeamDisplayAsset;
|
|
class UObject;
|
|
class UTexture;
|
|
struct FFrame;
|
|
|
|
/** 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);
|
|
};
|