private void OnGameTypeSelection(SelectorVM <SelectorItemVM> selector) { int num = selector.get_ItemList()[selector.get_SelectedIndex()].get_StringItem().IndexOf("siege", StringComparison.OrdinalIgnoreCase) >= 0 ? 1 : 0; bool flag = selector.get_ItemList()[selector.get_SelectedIndex()].get_StringItem().IndexOf("vill", StringComparison.OrdinalIgnoreCase) >= 0; this._mapSelectionGroup.SetSearchMode(num == 0 ? (!flag ? MapSelectionGroup.SearchMode.Battle : MapSelectionGroup.SearchMode.Village) : MapSelectionGroup.SearchMode.Siege); }
private void OnEnemyCharacterSelection(SelectorVM <SelectorItemVM> selector) { this.EnemySide.CurrentSelectedCharacter = new CharacterViewModel((CharacterViewModel.StanceTypes) 1); this.EnemySide.CurrentSelectedCharacter.FillFrom(this._charactersList[selector.get_SelectedIndex()], -1); ((IEnumerable <SelectorItemVM>) this.PlayerSide.CharacterSelectionGroup.get_ItemList()).ToList <SelectorItemVM>().ForEach((Action <SelectorItemVM>)(i => i.set_CanBeSelected(true))); if (this.PlayerSide.CharacterSelectionGroup.get_ItemList().Count <= selector.get_SelectedIndex()) { return; } this.PlayerSide.CharacterSelectionGroup.get_ItemList()[selector.get_SelectedIndex()].set_CanBeSelected(false); }
private void OnPlayerTypeSelectionChange(SelectorVM <SelectorItemVM> obj) { this._onPlayerTypeChange(obj.get_SelectedIndex() == 0); }