Add GameLift matchmaking backfill server support (#4622)
* Add GameLift matchmaking backfill server support Signed-off-by: onecent1101 <liug@amazon.com>
This commit is contained in:
+1
-44
@@ -14,53 +14,10 @@
|
||||
|
||||
namespace AWSGameLift
|
||||
{
|
||||
void AWSGameLiftPlayerInformation::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<AWSGameLiftPlayerInformation>()
|
||||
->Version(0)
|
||||
->Field("latencyInMs", &AWSGameLiftPlayerInformation::m_latencyInMs)
|
||||
->Field("playerAttributes", &AWSGameLiftPlayerInformation::m_playerAttributes)
|
||||
->Field("playerId", &AWSGameLiftPlayerInformation::m_playerId)
|
||||
->Field("team", &AWSGameLiftPlayerInformation::m_team);
|
||||
|
||||
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
|
||||
{
|
||||
editContext->Class<AWSGameLiftPlayerInformation>("AWSGameLiftPlayerInformation", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
->DataElement(
|
||||
AZ::Edit::UIHandlers::Default, &AWSGameLiftPlayerInformation::m_latencyInMs, "LatencyInMs",
|
||||
"A set of values, expressed in milliseconds, that indicates the amount of latency that"
|
||||
"a player experiences when connected to AWS Regions")
|
||||
->DataElement(
|
||||
AZ::Edit::UIHandlers::Default, &AWSGameLiftPlayerInformation::m_playerAttributes, "PlayerAttributes",
|
||||
"A collection of key:value pairs containing player information for use in matchmaking")
|
||||
->DataElement(
|
||||
AZ::Edit::UIHandlers::Default, &AWSGameLiftPlayerInformation::m_playerId, "PlayerId",
|
||||
"A unique identifier for a player")
|
||||
->DataElement(
|
||||
AZ::Edit::UIHandlers::Default, &AWSGameLiftPlayerInformation::m_team, "Team",
|
||||
"Name of the team that the player is assigned to in a match");
|
||||
}
|
||||
}
|
||||
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<AWSGameLiftPlayerInformation>("AWSGameLiftPlayerInformation")
|
||||
->Attribute(AZ::Script::Attributes::Storage, AZ::Script::Attributes::StorageType::Value)
|
||||
->Property("LatencyInMs", BehaviorValueProperty(&AWSGameLiftPlayerInformation::m_latencyInMs))
|
||||
->Property("PlayerAttributes", BehaviorValueProperty(&AWSGameLiftPlayerInformation::m_playerAttributes))
|
||||
->Property("PlayerId", BehaviorValueProperty(&AWSGameLiftPlayerInformation::m_playerId))
|
||||
->Property("Team", BehaviorValueProperty(&AWSGameLiftPlayerInformation::m_team));
|
||||
}
|
||||
}
|
||||
|
||||
void AWSGameLiftStartMatchmakingRequest::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
AzFramework::StartMatchmakingRequest::Reflect(context);
|
||||
AWSGameLiftPlayerInformation::Reflect(context);
|
||||
AWSGameLiftPlayer::Reflect(context);
|
||||
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user