private void OnChangeFactionCB(GameObject gameObject) { if (this.CompetitorIsLocalOwner) { AgeControlDropList component = gameObject.GetComponent <AgeControlDropList>(); if (component != null) { GuiFaction guiFaction = this.guiFactions[component.SelectedItem]; this.SelectFaction(guiFaction.Faction); } } }
private void OnChangeHandicapCB(GameObject gameObject) { if (this.Session.IsHosting) { AgeControlDropList component = gameObject.GetComponent <AgeControlDropList>(); if (component != null) { int selectedItem = component.SelectedItem; string message = string.Format("q:/Handicap{0}/{1}", this.EmpireIndex, selectedItem); this.Session.SendLobbyChatMessage(message); } } }
private void OnChangeColorCB(GameObject gameObject) { if (this.CompetitorIsLocalOwner) { AgeControlDropList component = gameObject.GetComponent <AgeControlDropList>(); if (component != null) { int selectedItem = component.SelectedItem; string message = string.Format("q:/Color{0}/{1}", this.EmpireIndex, selectedItem); this.Session.SendLobbyChatMessage(message); if (this.CompetitorIsLocalOwner && this.CompetitorIsHuman) { Amplitude.Unity.Framework.Application.Registry.SetValue <int>("Preferences/Lobby/Color", selectedItem); } } } }