Antura  1.1.0
Antura.Profile.PlayerProfileManager Class Reference

Handles the creation, selection, and deletion of player profiles. More...

Public Member Functions

PlayerProfile SetPlayerAsCurrentByUUID (string playerUUID)
 Sets the player as current player profile loading from db by UUID. More...
 
PlayerProfile GetPlayerProfileByUUID (string playerUUID)
 Gets the player profile from db by UUID. More...
 
void LoadSettings (bool alsoLoadCurrentPlayerProfile=true)
 Reloads all the settings and, optionally, the current player TODO: rebuild database only for desynchronized profile More...
 
List< PlayerIconDataGetPlayersIconData ()
 Return the list of existing player profiles. More...
 
void UpdateCurrentPlayerIconDataInSettings ()
 Updates the PlayerIconData for current player in list of PlayersIconData in GameSettings. More...
 
string CreatePlayerProfile (int age, PlayerGender gender, int avatarID, PlayerTint tint, bool isDemoUser=false)
 Creates the player profile. More...
 
void SavePlayerProfile (PlayerProfile _playerProfile)
 Saves the player profile. More...
 
PlayerProfile DeletePlayerProfile (string playerUUID)
 Deletes the player profile. More...
 
void ResetEverything ()
 Resets everything. More...
 
void ImportAllPlayerProfiles ()
 
void ImportPlayerProfile (string filePath)
 
delegate void ProfileEventHandler ()
 
bool IsDemoUserExisting ()
 

Properties

PlayerProfile CurrentPlayer [get, set]
 The player that is currently playing. More...
 

Events

static ProfileEventHandler OnProfileChanged
 Occurs when [on profile changed]. More...
 
static ProfileEventHandler OnNewProfileCreated
 

Detailed Description

Handles the creation, selection, and deletion of player profiles.

Member Function Documentation

◆ CreatePlayerProfile()

string Antura.Profile.PlayerProfileManager.CreatePlayerProfile ( int  age,
PlayerGender  gender,
int  avatarID,
PlayerTint  tint,
bool  isDemoUser = false 
)

Creates the player profile.

Parameters
ageThe age.
genderThe gender.
avatarIDThe avatar identifier.
tintThe color.
Returns

◆ DeletePlayerProfile()

PlayerProfile Antura.Profile.PlayerProfileManager.DeletePlayerProfile ( string  playerUUID)

Deletes the player profile.

Parameters
playerUUIDThe player UUID.
Returns

◆ GetPlayerProfileByUUID()

PlayerProfile Antura.Profile.PlayerProfileManager.GetPlayerProfileByUUID ( string  playerUUID)

Gets the player profile from db by UUID.

Parameters
playerUUIDThe player UUID.
Returns

◆ GetPlayersIconData()

List<PlayerIconData> Antura.Profile.PlayerProfileManager.GetPlayersIconData ( )

Return the list of existing player profiles.

Returns

◆ ImportAllPlayerProfiles()

void Antura.Profile.PlayerProfileManager.ImportAllPlayerProfiles ( )

◆ ImportPlayerProfile()

void Antura.Profile.PlayerProfileManager.ImportPlayerProfile ( string  filePath)

◆ IsDemoUserExisting()

bool Antura.Profile.PlayerProfileManager.IsDemoUserExisting ( )

◆ LoadSettings()

void Antura.Profile.PlayerProfileManager.LoadSettings ( bool  alsoLoadCurrentPlayerProfile = true)

Reloads all the settings and, optionally, the current player TODO: rebuild database only for desynchronized profile

◆ ProfileEventHandler()

delegate void Antura.Profile.PlayerProfileManager.ProfileEventHandler ( )

◆ ResetEverything()

void Antura.Profile.PlayerProfileManager.ResetEverything ( )

Resets everything.

◆ SavePlayerProfile()

void Antura.Profile.PlayerProfileManager.SavePlayerProfile ( PlayerProfile  _playerProfile)

Saves the player profile.

Parameters
_playerProfileThe player profile.

◆ SetPlayerAsCurrentByUUID()

PlayerProfile Antura.Profile.PlayerProfileManager.SetPlayerAsCurrentByUUID ( string  playerUUID)

Sets the player as current player profile loading from db by UUID.

Parameters
playerUUIDThe player UUID.
Returns

◆ UpdateCurrentPlayerIconDataInSettings()

void Antura.Profile.PlayerProfileManager.UpdateCurrentPlayerIconDataInSettings ( )

Updates the PlayerIconData for current player in list of PlayersIconData in GameSettings.

Property Documentation

◆ CurrentPlayer

PlayerProfile Antura.Profile.PlayerProfileManager.CurrentPlayer
getset

The player that is currently playing.

Event Documentation

◆ OnNewProfileCreated

ProfileEventHandler Antura.Profile.PlayerProfileManager.OnNewProfileCreated
static

◆ OnProfileChanged

ProfileEventHandler Antura.Profile.PlayerProfileManager.OnProfileChanged
static

Occurs when [on profile changed].


The documentation for this class was generated from the following file: