private void SetActiveControl(bool isActive) { Manager.Input instance = Singleton <Manager.Input> .Instance; IEnumerator coroutine; if (isActive) { instance.FocusLevel = 0; instance.MenuElements = this.MenuUIList; coroutine = this.DoOpen(); } else { instance.ClearMenuElements(); instance.FocusLevel = 0; coroutine = this.DoClose(); } if (this._fadeDisposable != null) { this._fadeDisposable.Dispose(); } this._fadeDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => coroutine), false), (System.Action <M0>)(_ => {}), (System.Action <Exception>)(ex => Debug.LogException(ex))); }
private void SetActiveControl(bool active) { Manager.Input instance = Singleton <Manager.Input> .Instance; IEnumerator coroutine; if (active) { ((ReactiveProperty <int>) this._selectedID).set_Value(-1); Time.set_timeScale(0.0f); Dictionary <int, AgentData> agentTable = Singleton <Game> .Instance.WorldData.AgentTable; for (int key = 0; key < 4; ++key) { AgentData agentData = agentTable[key]; ChaFileControl chaFileControl = new ChaFileControl(); if (!agentData.CharaFileName.IsNullOrEmpty() && chaFileControl.LoadCharaFile(agentData.CharaFileName, (byte)1, false, true)) { string empty = string.Empty; VoiceInfo.Param obj; string str = Singleton <Manager.Voice> .Instance.voiceInfoDic.TryGetValue(chaFileControl.parameter.personality, out obj) ? obj.Personality : "不明"; this._infos[key] = new GameCharaFileInfo() { name = chaFileControl.parameter.fullname, personality = str, voice = chaFileControl.parameter.personality, hair = chaFileControl.custom.hair.kind, birthMonth = (int)chaFileControl.parameter.birthMonth, birthDay = (int)chaFileControl.parameter.birthDay, strBirthDay = chaFileControl.parameter.strBirthDay, sex = (int)chaFileControl.parameter.sex, FullPath = string.Format("{0}chara/female/{1}.png", (object)UserData.Path, (object)agentData.CharaFileName), FileName = agentData.CharaFileName, gameRegistration = chaFileControl.gameinfo.gameRegistration, flavorState = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.flavorState), phase = chaFileControl.gameinfo.phase, normalSkill = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.normalSkill), hSkill = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.hSkill), favoritePlace = chaFileControl.gameinfo.favoritePlace, futanari = chaFileControl.parameter.futanari, lifeStyle = chaFileControl.gameinfo.lifestyle, data_uuid = chaFileControl.dataID }; } else { this._infos[key] = (GameCharaFileInfo)null; } if (this._infos[key] != null) { this._charaTexts[key].set_text(this._infos[key].name ?? "-----"); } else { this._charaTexts[key].set_text("-----"); } this._objFemaleParameterWindow.SetActiveIfDifferent(false); ((UnityEngine.Component) this._charaButtons[key]).get_gameObject().SetActiveIfDifferent(agentData.OpenState); if (((UnityEngine.Component) this._charaButtons[key]).get_gameObject().get_activeSelf()) { ((Selectable)this._charaButtons[key]).set_interactable(agentTable.ContainsKey(key) && !agentTable[key].CharaFileName.IsNullOrEmpty()); } } instance.FocusLevel = 0; instance.MenuElements = this.MenuUIList; coroutine = this.OpenCoroutine(); } else { instance.ClearMenuElements(); instance.FocusLevel = -1; coroutine = this.CloseCoroutine(); } if (this._fadeDisposable != null) { this._fadeDisposable.Dispose(); } this._fadeDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => coroutine), false), (System.Action <M0>)(_ => {}), (System.Action <Exception>)(ex => Debug.LogException(ex))); }