예제 #1
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            this._lerpStream = (IObservable <TimeInterval <float> >)Observable.TakeUntilDestroy <TimeInterval <float> >((IObservable <M0>)Observable.FrameTimeInterval <float>((IObservable <M0>)ObservableEasing.Linear(this._alphaAccelerationTime, true), true), (Component)this);
            // ISSUE: method pointer
            ((UnityEvent)this._submitButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            // ISSUE: method pointer
            ((UnityEvent)this._cancelButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

            // ISSUE: method pointer
            actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__3)));
            this._actionCommands.Add(actionIdDownCommand);
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            this._keyCommands.Add(keyCodeDownCommand);
        }
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(active => this.SetActiveControl(active)));
            // ISSUE: method pointer
            ((UnityEvent)this._charaButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this.OnSelectIDChangedAsObservable(), (Action <M0>)(x =>
            {
                ((Component)this._selectedImageTransform).get_gameObject().SetActiveIfDifferent(x != 1);
                if (((Component)this._selectedImageTransform).get_gameObject().get_activeSelf())
                {
                    ((Transform)this._selectedImageTransform).set_localPosition(((Transform)this._element).get_localPosition());
                }
                this._objPlayerParameterWindow.SetActiveIfDifferent(true);
                if (this._info == null)
                {
                    return;
                }
                this._txtPlayerCharaName.set_text(this._info.name);
                this._riPlayerCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(this._info.FullPath), 0, 0, (TextureFormat)5, false));
                int languageInt             = Singleton <GameSystem> .Instance.languageInt;
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.Append(this._info.sex != 0 ? this._localizeFemale[languageInt] : this._localizeMale[languageInt]);
                if (this._info.sex == 1 && this._info.futanari)
                {
                    stringBuilder.Append(this._localizeFutanari[languageInt]);
                }
                this._txtPlayerSex.set_text(stringBuilder.ToString());
            }));
            this._objPlayerParameterWindow.SetActiveIfDifferent(false);
            this._txtPlayerCharaName.set_text("NoName");
            this._riPlayerCard.set_texture((Texture)null);
            this._txtPlayerSex.set_text(string.Empty);
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__3)));
            this._keyCommands.Add(keyCodeDownCommand);
            // ISSUE: method pointer
            ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            Button.ButtonClickedEvent onClick = this._charaCreateButton.get_onClick();
            // ISSUE: reference to a compiler-generated field
            if (PlayerLookEditUI.\u003C\u003Ef__am\u0024cache0 == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                PlayerLookEditUI.\u003C\u003Ef__am\u0024cache0 = new UnityAction((object)null, __methodptr(\u003COnBeforeStart\u003Em__5));
            }
            // ISSUE: reference to a compiler-generated field
            UnityAction fAmCache0 = PlayerLookEditUI.\u003C\u003Ef__am\u0024cache0;

            ((UnityEvent)onClick).AddListener(fAmCache0);
            ((Component)this._selectedImageTransform).get_gameObject().SetActive(false);
        }
예제 #3
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(active => this.SetActiveControl(active)));
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            this._keyCommands.Add(keyCodeDownCommand);
            this._lcw.onLoadItemFunc = (Action <GameCharaFileInfo>)(dat =>
            {
                Singleton <Game> .Instance.WorldData.AgentTable[Singleton <Manager.Map> .Instance.AccessDeviceID].CharaFileName = dat.FileName;
                Singleton <Manager.Map> .Instance.Player.PlayerController.ChangeState("CharaEnter");
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
                this.Close();
            });
            this._lcw.onClickRightFunc  = (Action)null;
            this._lcw.onCloseWindowFunc = (GameLoadCharaWindow.OnCloseWindowFunc)(() =>
            {
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
                this.Close();
            });
            this._lcw.onCharaCreateClickAction = (Action <int>)(sex =>
            {
                if (Singleton <Scene> .Instance.IsNowLoadingFade)
                {
                    return;
                }
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
                CharaCustom.CharaCustom.modeNew   = true;
                CharaCustom.CharaCustom.modeSex   = (byte)1;
                CharaCustom.CharaCustom.actEixt   = (Action)null;
                CharaCustom.CharaCustom.nextScene = Singleton <Resources> .Instance.DefinePack.SceneNames.MapScene;
                Singleton <Scene> .Instance.LoadReserve(new Scene.Data()
                {
                    levelName = "CharaCustom",
                    isAdd     = false,
                    isFade    = true
                }, false);
            });
        }
예제 #4
0
        protected override void OnBeforeStart()
        {
            base.OnBeforeStart();
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            this._lerpStream = (IObservable <TimeInterval <float> >)Observable.TakeUntilDestroy <TimeInterval <float> >((IObservable <M0>)Observable.FrameTimeInterval <float>((IObservable <M0>)ObservableEasing.Linear(this._alphaAccelerationTime, true), true), (Component)this);
            if (this._closeButton != null)
            {
                // ISSUE: method pointer
                ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            }
            ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

            // ISSUE: method pointer
            actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            this._actionCommands.Add(actionIdDownCommand);
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__3)));
            this._keyCommands.Add(keyCodeDownCommand);
            if (this._escapeButton != null)
            {
                // ISSUE: method pointer
                ((UnityEvent)this._escapeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            }
            ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._chaseToggle), (Action <M0>)(x => this.ChangeChaseActor(x)));
            if (this._nameChangeButton != null)
            {
                // ISSUE: method pointer
                ((UnityEvent)this._nameChangeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__6)));
            }
            this._nameChangeUI.SubmitAction += (Action <string>)(str => this.NameChanged(str));
            ((MonoBehaviour)this).StartCoroutine(this.UISettingCoroutine());
        }
예제 #5
0
        protected override void OnBeforeStart()
        {
            this._elementPool = new GameLog.GameLogElementPool()
            {
                Source = this._node
            };
            this._lerpStream = (IObservable <TimeInterval <float> >)Observable.FrameTimeInterval <float>((IObservable <M0>)ObservableEasing.Linear(0.1f, true), true);
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            if (Object.op_Inequality((Object)this._closeButton, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            }
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            this._keyCommands.Add(keyCodeDownCommand);
        }
예제 #6
0
        protected override void OnBeforeStart()
        {
            base.OnBeforeStart();
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

            // ISSUE: method pointer
            actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__1)));
            this._actionCommands.Add(actionIdDownCommand);
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            this._keyCommands.Add(keyCodeDownCommand);
            ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoClose()));
            ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._changeButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this._listUI.IsActiveControl = !this._listUI.IsActiveControl));
        }
예제 #7
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (System.Action <M0>)(active => this.SetActiveControl(active)));
            for (int index = 0; index < this._charaButtons.Length; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey2 startCAnonStorey2 = new CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey2();
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey2.\u0024this = this;
                Button charaButton = this._charaButtons[index];
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey2.id = index;
                // ISSUE: method pointer
                ((UnityEvent)charaButton.get_onClick()).AddListener(new UnityAction((object)startCAnonStorey2, __methodptr(\u003C\u003Em__0)));
            }
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this.OnSelectIDChangedAsObservable(), (System.Action <M0>)(x =>
            {
                ((Selectable)this._charaCreateButton).set_interactable(x != -1);
                ((UnityEngine.Component) this._selectedImageTransform).get_gameObject().SetActiveIfDifferent(x != -1);
                if (((UnityEngine.Component) this._selectedImageTransform).get_gameObject().get_activeSelf())
                {
                    ((Transform)this._selectedImageTransform).set_localPosition(((Transform)this._elements[x]).get_localPosition());
                }
                GameCharaFileInfo element = this._infos.GetElement <GameCharaFileInfo>(x);
                if (element == null)
                {
                    return;
                }
                if (!element.FullPath.IsNullOrEmpty())
                {
                    bool activeSelf = this._objFemaleParameterWindow.get_activeSelf();
                    this._objFemaleParameterWindow.SetActiveIfDifferent(true);
                    if (!activeSelf)
                    {
                        this._femaleParameterSelectNum = 0;
                        this._tglFemaleStateSelects[0].SetIsOnWithoutCallback(true);
                        for (int index = 0; index < this._objFemaleParameterRoots.Length; ++index)
                        {
                            this._objFemaleParameterRoots[index].SetActiveIfDifferent(index == 0);
                        }
                    }
                    this._txtFemaleCharaName.set_text(element.name);
                    this._riFemaleCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(element.FullPath), 0, 0, (TextureFormat)5, false));
                    for (int index = 0; index < this._sccStateOfProgress.Length; ++index)
                    {
                        this._sccStateOfProgress[index].OnChangeValue(element.phase >= index ? 1 : 0);
                    }
                    string empty = string.Empty;
                    this._txtLifeStyle.set_text(!Lifestyle.LifestyleName.TryGetValue(element.lifeStyle, out empty) ? "--------------------" : (element.lifeStyle != 4 ? empty : "E・シーカー"));
                    this._txtGirlPower.set_text(element.flavorState[0].ToString());
                    this._txtTrust.set_text(element.flavorState[1].ToString());
                    this._txtHumanNature.set_text(element.flavorState[2].ToString());
                    this._txtInstinct.set_text(element.flavorState[3].ToString());
                    this._txtHentai.set_text(element.flavorState[4].ToString());
                    this._txtVigilance.set_text(element.flavorState[5].ToString());
                    this._txtSocial.set_text(element.flavorState[7].ToString());
                    this._txtDarkness.set_text(element.flavorState[6].ToString());
                    for (int key = 0; key < this._txtNormalSkillSlots.Length; ++key)
                    {
                        string str = "--------------------";
                        if (element.normalSkill.ContainsKey(key))
                        {
                            str = Singleton <Resources> .Instance.GameInfo.GetItem(16, element.normalSkill[key])?.Name ?? "--------------------";
                        }
                        this._txtNormalSkillSlots[key].set_text(str);
                    }
                    for (int key = 0; key < this._txtHSkillSlots.Length; ++key)
                    {
                        string str = "--------------------";
                        if (element.hSkill.ContainsKey(key))
                        {
                            str = Singleton <Resources> .Instance.GameInfo.GetItem(17, element.hSkill[key])?.Name ?? "--------------------";
                        }
                        this._txtHSkillSlots[key].set_text(str);
                    }
                }
                else
                {
                    this._txtFemaleCharaName.set_text(string.Empty);
                    this._riFemaleCard.set_texture((Texture)this._texEmpty);
                    for (int index = 0; index < this._sccStateOfProgress.Length; ++index)
                    {
                        this._sccStateOfProgress[index].OnChangeValue(element.phase >= index ? 1 : 0);
                    }
                    this._txtLifeStyle.set_text(string.Empty);
                    this._txtGirlPower.set_text(string.Empty);
                    this._txtTrust.set_text(string.Empty);
                    this._txtHumanNature.set_text(string.Empty);
                    this._txtInstinct.set_text(string.Empty);
                    this._txtHentai.set_text(string.Empty);
                    this._txtVigilance.set_text(string.Empty);
                    this._txtSocial.set_text(string.Empty);
                    this._txtDarkness.set_text(string.Empty);
                    for (int index = 0; index < this._txtNormalSkillSlots.Length; ++index)
                    {
                        string str = "--------------------";
                        this._txtNormalSkillSlots[index].set_text(str);
                    }
                    for (int index = 0; index < this._txtHSkillSlots.Length; ++index)
                    {
                        string str = "--------------------";
                        this._txtHSkillSlots[index].set_text(str);
                    }
                }
            }));
            this._objFemaleParameterWindow.SetActiveIfDifferent(false);
            this._txtFemaleCharaName.set_text("NoName");
            this._riFemaleCard.set_texture((Texture)null);
            for (int index = 0; index < this._sccStateOfProgress.Length; ++index)
            {
                this._sccStateOfProgress[index].OnChangeValue(index != 0 ? 0 : 1);
            }
            for (int index = 0; index < this._tglFemaleStateSelects.Length; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey3 startCAnonStorey3 = new CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey3();
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey3.\u0024this = this;
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey3.sel = index;
                // ISSUE: reference to a compiler-generated method
                // ISSUE: reference to a compiler-generated method
                ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this._tglFemaleStateSelects[index].onValueChanged), (Func <M0, bool>) new Func <bool, bool>(startCAnonStorey3.\u003C\u003Em__0)), (System.Action <M0>) new System.Action <bool>(startCAnonStorey3.\u003C\u003Em__1));
            }
            for (int index = 0; index < this._actionStateSelects.Length; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey4 startCAnonStorey4 = new CharaLookEditUI.\u003COnBeforeStart\u003Ec__AnonStorey4();
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey4.\u0024this = this;
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey4.sel = index;
                // ISSUE: method pointer
                this._actionStateSelects[index].listActionEnter.Add(new UnityAction((object)startCAnonStorey4, __methodptr(\u003C\u003Em__0)));
                // ISSUE: method pointer
                this._actionStateSelects[index].listActionExit.Add(new UnityAction((object)startCAnonStorey4, __methodptr(\u003C\u003Em__1)));
            }
            for (int index = 0; index < this._objFemaleStateSelectSels.Length; ++index)
            {
                this._objFemaleStateSelectSels[index].SetActiveIfDifferent(false);
            }
            this._txtLifeStyle.set_text(string.Empty);
            this._txtGirlPower.set_text("0");
            this._txtTrust.set_text("0");
            this._txtHumanNature.set_text("0");
            this._txtInstinct.set_text("0");
            this._txtHentai.set_text("0");
            this._txtVigilance.set_text("0");
            this._txtSocial.set_text("0");
            this._txtDarkness.set_text("0");
            for (int index = 0; index < this._txtNormalSkillSlots.Length; ++index)
            {
                this._txtNormalSkillSlots[index].set_text("--------------------");
            }
            for (int index = 0; index < this._txtHSkillSlots.Length; ++index)
            {
                this._txtHSkillSlots[index].set_text("--------------------");
            }
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            this._keyCommands.Add(keyCodeDownCommand);
            // ISSUE: method pointer
            ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__3)));
            // ISSUE: method pointer
            ((UnityEvent)this._charaCreateButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            ((Selectable)this._charaCreateButton).set_interactable(false);
            ((UnityEngine.Component) this._selectedImageTransform).get_gameObject().SetActive(false);
        }
예제 #8
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            ObservableExtensions.Subscribe <long>(Observable.OnErrorRetry <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled() && this.IsActiveControl))), (Action <M0>)(_ => this.OnUpdate()));
            this._statsText.set_text("ステータス");
            this._inventoryText.set_text("ポーチ");
            this._mapText.set_text("マップ");
            this._craftText.set_text("クラフト");
            this._cameraText.set_text("カメラ");
            this._callText.set_text("コール");
            this._helpText.set_text("ヘルプ");
            this._logText.set_text("ログ");
            this._saveText.set_text("セーブ");
            this._optionText.set_text("オプション");
            if (Object.op_Implicit((Object)this._statsButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._statsButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__3)));
            }
            if (Object.op_Implicit((Object)this._inventoryButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._inventoryButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            }
            if (Object.op_Implicit((Object)this._mapButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._mapButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__5)));
            }
            if (Object.op_Implicit((Object)this._craftButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._craftButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__6)));
            }
            if (Object.op_Implicit((Object)this._cameraButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._cameraButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__7)));
            }
            if (Object.op_Implicit((Object)this._callButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._callButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__8)));
            }
            if (Object.op_Implicit((Object)this._helpButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._helpButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__9)));
            }
            if (Object.op_Implicit((Object)this._logButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._logButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__A)));
            }
            if (Object.op_Implicit((Object)this._saveButton))
            {
                Button.ButtonClickedEvent onClick = this._saveButton.get_onClick();
                // ISSUE: reference to a compiler-generated field
                if (HomeMenu.\u003C\u003Ef__am\u0024cache0 == null)
                {
                    // ISSUE: reference to a compiler-generated field
                    // ISSUE: method pointer
                    HomeMenu.\u003C\u003Ef__am\u0024cache0 = new UnityAction((object)null, __methodptr(\u003COnBeforeStart\u003Em__B));
                }
                // ISSUE: reference to a compiler-generated field
                UnityAction fAmCache0 = HomeMenu.\u003C\u003Ef__am\u0024cache0;
                ((UnityEvent)onClick).AddListener(fAmCache0);
            }
            if (Object.op_Implicit((Object)this._optionButton))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._optionButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__C)));
            }
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__D)));
            this._keyCommands.Add(keyCodeDownCommand);
            this.EnabledInput = false;
        }
예제 #9
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(active => this.SetActiveControl(active)));
            // ISSUE: method pointer
            ((UnityEvent)this._playerButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__2)));
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this.OnSelectIDChangedAsObservable(), (Action <M0>)(x =>
            {
                ((Component)this._selectedImageTransform).get_gameObject().SetActiveIfDifferent(x != 1);
                if (!((Component)this._selectedImageTransform).get_gameObject().get_activeSelf())
                {
                    return;
                }
                ((Transform)this._selectedImageTransform).set_localPosition(((Transform)this._element).get_localPosition());
            }));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveLCWChangedAsObservable(), (Action <M0>)(active => this.SetActiveControlLCW(active)));
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__5)));
            this._keyCommands.Add(keyCodeDownCommand);
            // ISSUE: method pointer
            ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__6)));
            this._lcw.onLoadItemFunc = (Action <GameCharaFileInfo>)(dat =>
            {
                PlayerData playerData = Singleton <Game> .Instance.WorldData.PlayerData;
                playerData.CharaFileNames[dat.sex] = dat.FileName;
                playerData.Sex = (byte)dat.sex;
                this._info     = dat;
                this._charaText.set_text(dat.name);
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
            });
            this._lcw.onClickRightFunc = (Action)(() =>
            {
                if (!((ReactiveProperty <bool>) this._isActiveLCW).get_Value())
                {
                    return;
                }
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
            });
            this._lcw.onCloseWindowFunc = (GameLoadCharaWindow.OnCloseWindowFunc)(() =>
            {
                if (!((ReactiveProperty <bool>) this._isActiveLCW).get_Value())
                {
                    return;
                }
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
            });
            this._lcw.onCharaCreateClickAction = (Action <int>)(sex =>
            {
                if (Singleton <Scene> .Instance.IsNowLoadingFade)
                {
                    return;
                }
                CharaCustom.CharaCustom.modeNew   = true;
                CharaCustom.CharaCustom.modeSex   = (byte)sex;
                CharaCustom.CharaCustom.actEixt   = (Action)null;
                CharaCustom.CharaCustom.nextScene = Singleton <Resources> .Instance.DefinePack.SceneNames.MapScene;
                Singleton <Scene> .Instance.LoadReserve(new Scene.Data()
                {
                    levelName = "CharaCustom",
                    isAdd     = false,
                    isFade    = true
                }, false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
            });
            ((Component)this._selectedImageTransform).get_gameObject().SetActive(false);
        }
예제 #10
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(active => this.SetActiveControl(active)));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveParameterChangedAsObservable(), (Action <M0>)(active => this.SetActiveParameter(active)));
            this._selectFolder = new BoolReactiveProperty();
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._selectFolder, (Action <M0>)(x =>
            {
                if (x)
                {
                    ((Component)this._buttonInput).get_gameObject().SetActiveIfDifferent(true);
                    ((Component)this._buttonOutput).get_gameObject().SetActiveIfDifferent(false);
                    ((ReactiveProperty <bool>) this._isActiveParameter).set_Value(true);
                }
                else
                {
                    ((ReactiveProperty <bool>) this._isActiveParameter).set_Value(false);
                }
            }));
            this._selectSaveData = new BoolReactiveProperty();
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._selectSaveData, (Action <M0>)(x =>
            {
                if (x)
                {
                    ((Component)this._buttonInput).get_gameObject().SetActiveIfDifferent(false);
                    ((Component)this._buttonOutput).get_gameObject().SetActiveIfDifferent(true);
                    ((ReactiveProperty <bool>) this._isActiveParameter).set_Value(true);
                }
                else
                {
                    ((ReactiveProperty <bool>) this._isActiveParameter).set_Value(false);
                }
            }));
            this._folderCoordinateListUI.OnChangeItemFunc = (CoordinateListUI.ChangeItemFunc)(dat =>
            {
                this._selectInfo = dat;
                if (dat == null)
                {
                    return;
                }
                this._rawImageCoordinateCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(dat.FullPath), 0, 0, (TextureFormat)5, false));
            });
            this._savedataCoordinateListUI.OnChangeItemFunc = (CoordinateListUI.ChangeItemFunc)(dat =>
            {
                this._selectInfo = dat;
                if (dat == null)
                {
                    return;
                }
                this._rawImageCoordinateCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(dat.FullPath), 0, 0, (TextureFormat)5, false));
            });
            this._folderCoordinateListUI.OnChangeItem = (Action <bool>)(isOn =>
            {
                if (isOn)
                {
                    ((ReactiveProperty <bool>) this._selectSaveData).set_Value(!isOn);
                    this._savedataCoordinateListUI.SelectDataClear();
                    this._savedataCoordinateListUI.SetNowSelectToggle();
                    ((ReactiveProperty <bool>) this._selectFolder).set_Value(isOn);
                }
                else
                {
                    ((ReactiveProperty <bool>) this._selectFolder).set_Value(false);
                    ((ReactiveProperty <bool>) this._selectSaveData).set_Value(false);
                }
            });
            this._savedataCoordinateListUI.OnChangeItem = (Action <bool>)(isOn =>
            {
                if (isOn)
                {
                    ((ReactiveProperty <bool>) this._selectFolder).set_Value(!isOn);
                    this._folderCoordinateListUI.SelectDataClear();
                    this._folderCoordinateListUI.SetNowSelectToggle();
                    ((ReactiveProperty <bool>) this._selectSaveData).set_Value(isOn);
                }
                else
                {
                    ((ReactiveProperty <bool>) this._selectFolder).set_Value(false);
                    ((ReactiveProperty <bool>) this._selectSaveData).set_Value(false);
                }
            });
            if (Object.op_Implicit((Object)this._buttonInput))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._buttonInput.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__8)));
            }
            if (Object.op_Implicit((Object)this._buttonOutput))
            {
                // ISSUE: method pointer
                ((UnityEvent)this._buttonOutput.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__9)));
            }
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__A)));
            this._keyCommands.Add(keyCodeDownCommand);
            if (!Object.op_Implicit((Object)this._buttonClose))
            {
                return;
            }
            // ISSUE: method pointer
            ((UnityEvent)this._buttonClose.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__B)));
            ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._buttonClose), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select)));
            ((Component)this._buttonClose).get_gameObject().SetActiveIfDifferent(!this._hideClose);
        }
예제 #11
0
        protected override void OnBeforeStart()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(active => this.SetActiveControl(active)));
            for (int index = 0; index < this._charaButtons.Length; ++index)
            {
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                CharaChangeUI.\u003COnBeforeStart\u003Ec__AnonStorey4 startCAnonStorey4 = new CharaChangeUI.\u003COnBeforeStart\u003Ec__AnonStorey4();
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey4.\u0024this = this;
                Button charaButton = this._charaButtons[index];
                // ISSUE: reference to a compiler-generated field
                startCAnonStorey4.id = index;
                // ISSUE: method pointer
                ((UnityEvent)charaButton.get_onClick()).AddListener(new UnityAction((object)startCAnonStorey4, __methodptr(\u003C\u003Em__0)));
            }
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this.OnSelectIDChangedAsObservable(), (Action <M0>)(x =>
            {
                ((Component)this._selectedImageTransform).get_gameObject().SetActiveIfDifferent(x != -1);
                if (!((Component)this._selectedImageTransform).get_gameObject().get_activeSelf())
                {
                    return;
                }
                ((Transform)this._selectedImageTransform).set_localPosition(((Transform)this._elements[x]).get_localPosition());
            }));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveLCWChangedAsObservable(), (Action <M0>)(active => this.SetActiveControlLCW(active)));
            KeyCodeDownCommand keyCodeDownCommand = new KeyCodeDownCommand()
            {
                KeyCode = (KeyCode)324
            };

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__4)));
            this._keyCommands.Add(keyCodeDownCommand);
            // ISSUE: method pointer
            ((UnityEvent)this._closeButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003COnBeforeStart\u003Em__5)));
            this._lcw.onLoadItemFunc = (Action <GameCharaFileInfo>)(dat =>
            {
                string charaFileName = Singleton <Game> .Instance.WorldData.AgentTable[((ReactiveProperty <int>) this._selectedID).get_Value()].CharaFileName;
                AgentActor agentActor;
                string str;
                if (Singleton <Manager.Map> .Instance.AgentTable.TryGetValue(((ReactiveProperty <int>) this._selectedID).get_Value(), ref agentActor) && this._prevCharaNames.TryGetValue(((ReactiveProperty <int>) this._selectedID).get_Value(), out str) && (str == charaFileName && !charaFileName.IsNullOrEmpty()))
                {
                    agentActor.ChaControl.chaFile.SaveCharaFile(agentActor.ChaControl.chaFile.charaFileName, byte.MaxValue, false);
                }
                Singleton <Game> .Instance.WorldData.AgentTable[((ReactiveProperty <int>) this._selectedID).get_Value()].CharaFileName = dat.FileName;
                if (this._prevCharaMapIDs[((ReactiveProperty <int>) this._selectedID).get_Value()] != Singleton <Manager.Map> .Instance.MapID)
                {
                    if (!dat.FileName.IsNullOrEmpty())
                    {
                        Singleton <Game> .Instance.WorldData.AgentTable[((ReactiveProperty <int>) this._selectedID).get_Value()].MapID = Singleton <Manager.Map> .Instance.MapID;
                    }
                    else
                    {
                        Singleton <Game> .Instance.WorldData.AgentTable[((ReactiveProperty <int>) this._selectedID).get_Value()].MapID = this._prevCharaMapIDs[((ReactiveProperty <int>) this._selectedID).get_Value()];
                    }
                }
                this._infos[((ReactiveProperty <int>) this._selectedID).get_Value()] = dat;
                this._charaTexts[((ReactiveProperty <int>) this._selectedID).get_Value()].set_text(dat.name ?? "-----");
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
            });
            this._lcw.onClickRightFunc = (Action)(() =>
            {
                if (!((ReactiveProperty <bool>) this._isActiveLCW).get_Value())
                {
                    return;
                }
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
            });
            this._lcw.onCloseWindowFunc = (GameLoadCharaWindow.OnCloseWindowFunc)(() =>
            {
                if (!((ReactiveProperty <bool>) this._isActiveLCW).get_Value())
                {
                    return;
                }
                ((ReactiveProperty <bool>) this._isActiveLCW).set_Value(false);
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
            });
            this._lcw.onCharaCreateClickAction = (Action <int>)(sex =>
            {
                if (Singleton <Scene> .Instance.IsNowLoadingFade)
                {
                    return;
                }
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
                CharaCustom.CharaCustom.modeNew   = true;
                CharaCustom.CharaCustom.modeSex   = (byte)1;
                CharaCustom.CharaCustom.actEixt   = (Action)null;
                CharaCustom.CharaCustom.nextScene = Singleton <Resources> .Instance.DefinePack.SceneNames.MapScene;
                Singleton <Scene> .Instance.LoadReserve(new Scene.Data()
                {
                    levelName = "CharaCustom",
                    isAdd     = false,
                    isFade    = true
                }, false);
            });
            ((Component)this._selectedImageTransform).get_gameObject().SetActive(false);
        }