GodotMattohaLobbySystem 0.2.4
Loading...
Searching...
No Matches
Mattoha.Core.MattohaUtils Class Reference

Static Public Member Functions

static Dictionary< string, Variant > ToSecuredDict (Dictionary< string, Variant > dict)
 Return Godot Dictionary without Props that exists in "PrivateProps" list property, used when sending player data to other players.
 
static Dictionary< string, Variant > ToChatDict (Dictionary< string, Variant > dict)
 Convert GodotDictionary to a new object that has only ChatProps fields.
 
static Array< string > GetPrivateProps (Dictionary< string, Variant > dict)
 Get A PrivateProps property value as List<string> from GodotDictionary.
 
static Array< String > GetChatProps (Dictionary< string, Variant > dict)
 Get A ChatProps property value as List<string> from GodotDictionary.
 
static bool IsPrimitive (Variant obj)
 Check if a Variant object is primitive.
 
static bool IsEnumerable (Variant obj)
 Check if a Variant object is enumerbale.
 

Member Function Documentation

◆ GetChatProps()

static Array< String > Mattoha.Core.MattohaUtils.GetChatProps ( Dictionary< string, Variant > dict)
static

Get A ChatProps property value as List<string> from GodotDictionary.

Parameters
dictGodotDictionary to check if it has ChatProps.
Returns
List of chat properties names.

◆ GetPrivateProps()

static Array< string > Mattoha.Core.MattohaUtils.GetPrivateProps ( Dictionary< string, Variant > dict)
static

Get A PrivateProps property value as List<string> from GodotDictionary.

Parameters
dictGodotDictionary to check if it has PrivateProps.
Returns
List of private properties names.

◆ ToChatDict()

static Dictionary< string, Variant > Mattoha.Core.MattohaUtils.ToChatDict ( Dictionary< string, Variant > dict)
static

Convert GodotDictionary to a new object that has only ChatProps fields.

Parameters
dictobject to copy from.
Returns
GodotDictionary with ChatProps only.

◆ ToSecuredDict()

static Dictionary< string, Variant > Mattoha.Core.MattohaUtils.ToSecuredDict ( Dictionary< string, Variant > dict)
static

Return Godot Dictionary without Props that exists in "PrivateProps" list property, used when sending player data to other players.

Parameters
dictdictionary to copy from.
Returns
New dictionary without PrivateProps properties.