public void LogCharacterSelections(int iPlayer) { for (int iChr = 0; iChr < Player.MAXCHRS; iChr++) { CharType.CHARTYPE chartype = NetworkMatchSetup.GetCharacterSelection(iPlayer, iChr); WriteToMatchLogFile(string.Format("cs:{0}:{1}:{2}:{3}", iPlayer, iChr, (int)chartype, CharType.GetChrName(chartype))); } }
public void UpdateDropdownOptions() { LibView.SetDropdownOptions(dropdown, CharType.GetAllChrNames()); //Ensure the default-selected option for this dropdown is mirroring the default in the matchsetup dropdown.SetValueWithoutNotify((int)NetworkMatchSetup.GetCharacterSelection(plyrselectorParent.idPlayer, idChr)); dropdown.RefreshShownValue(); }
public void OnChrSelectChange() { Debug.Assert(0 <= idChr && idChr < 3); NetworkMatchSetup.SetCharacterSelection(plyrselectorParent.idPlayer, idChr, (CharType.CHARTYPE)dropdown.value); //Now that our character has been reselected, we need to load in a starting loadout for that character NetworkMatchSetup.SetLoadout(plyrselectorParent.idPlayer, idChr, LoadoutManager.LoadSavedLoadoutForChr(NetworkMatchSetup.GetCharacterSelection(plyrselectorParent.idPlayer, idChr), 0)); Debug.LogFormat("Changed chr to {0} with a starting loadout of {1}", NetworkMatchSetup.GetCharacterSelection(plyrselectorParent.idPlayer, idChr), NetworkMatchSetup.GetLoadout(plyrselectorParent.idPlayer, idChr)); }
void InitAllChrs() { for (int i = 0; i < nPlayers; i++) { arChrs[i] = new Chr[Player.MAXCHRS]; arPlayers[i].nChrs = Player.MAXCHRS; for (int j = 0; j < arPlayers[i].nChrs; j++) { InitChr(NetworkMatchSetup.GetCharacterSelection(i, j), arPlayers[i], j, NetworkMatchSetup.GetLoadout(i, j)); } } }
public CharType.CHARTYPE ChrTypeSelectingFor() { return(NetworkMatchSetup.GetCharacterSelection(iPlayerSelectingFor, iChrSelectingFor)); }