예제 #1
0
 private void _UpdateSelectedProfile(int playerNum, Guid profileId)
 {
     _NameSelections[_NameSelection].RemoveUsedProfile(CGame.Players[playerNum].ProfileID);
     _NameSelections[_NameSelection].UseProfile(profileId);
     //Update Game-infos with new player
     CGame.Players[playerNum].ProfileID = profileId;
     //Update config for default players.
     CConfig.Config.Game.Players[playerNum] = CProfiles.GetProfileFileName(profileId);
     CConfig.SaveConfig();
     //Update texture and name
     _Statics[_PlayerStaticAvatar[playerNum]].Texture = CProfiles.GetAvatarTextureFromProfile(profileId);
     _Texts[_PlayerText[playerNum]].Text = CProfiles.GetPlayerName(profileId);
     //Update profile-warning
     //_CheckPlayers();
     //Update Tiles-List
     _NameSelections[_NameSelection].UpdateList();
 }