36 lines
1.5 KiB
C
36 lines
1.5 KiB
C
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "CoreMinimal.h"
|
||
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
||
|
|
||
|
#include "LyraTeamStatics.generated.h"
|
||
|
|
||
|
class ULyraTeamDisplayAsset;
|
||
|
|
||
|
/** 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);
|
||
|
};
|