Files
UnrealEngineUWP/Engine/Source/Runtime/ClientPilot/Private/ClientPilotBlackboard.cpp
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

68 lines
1.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "ClientPilotBlackboard.h"
void UClientPilotBlackboard::InitializeFromProfile(FString ProfileCategoryAndName)
{
}
FString UClientPilotBlackboard::GetStringValue(FString KeyName)
{
FString RetVal = TEXT("");
if (Blackboard.Contains(KeyName))
{
RetVal = Blackboard[KeyName];
}
return RetVal;
}
FVector UClientPilotBlackboard::GetVectorValue(FString KeyName)
{
FVector RetVal;
if (Blackboard.Contains(KeyName))
{
RetVal.InitFromString(*Blackboard[KeyName]);
}
return RetVal;
}
float UClientPilotBlackboard::GetFloatValue(FString KeyName)
{
float RetVal = 0.f;
if (Blackboard.Contains(KeyName))
{
RetVal = FCString::Atof(*Blackboard[KeyName]);
}
return RetVal;
}
int UClientPilotBlackboard::GetIntValue(FString KeyName)
{
int RetVal = 0;
if (Blackboard.Contains(KeyName))
{
RetVal = FCString::Atoi(*Blackboard[KeyName]);
}
return RetVal;
}
void UClientPilotBlackboard::AddOrUpdateValue(FString KeyName, float Value)
{
Blackboard.Emplace(KeyName, FString::SanitizeFloat(Value));
}
void UClientPilotBlackboard::AddOrUpdateValue(FString KeyName, int Value)
{
Blackboard.Emplace(KeyName, FString::FromInt(Value));
}
void UClientPilotBlackboard::AddOrUpdateValue(FString KeyName, FString Value)
{
Blackboard.Emplace(KeyName, Value);
}
void UClientPilotBlackboard::AddOrUpdateValue(FString KeyName, FVector Value)
{
Blackboard.Emplace(KeyName, Value.ToString());
}