public override void Init()
        {
            ActionSystem actData = Manager.Config.ActData;

            this.LinkToggleArray(this.lookToggles, (Action <int>)(i => actData.Look = i == 0));
            this.LinkSlider(this.tpsSensitivityXSlider, (Action <float>)(value => actData.TPSSensitivityY = (int)value));
            this.LinkSlider(this.tpsSensitivityYSlider, (Action <float>)(value => actData.TPSSensitivityX = (int)value));
            this.LinkSlider(this.fpsSensitivityXSlider, (Action <float>)(value => actData.FPSSensitivityY = (int)value));
            this.LinkSlider(this.fpsSensitivityYSlider, (Action <float>)(value => actData.FPSSensitivityX = (int)value));
            this.LinkToggleArray(this.invertMoveXToggles, (Action <int>)(i => actData.InvertMoveY         = i == 1));
            this.LinkToggleArray(this.invertMoveYToggles, (Action <int>)(i => actData.InvertMoveX         = i == 1));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityXResetButton), (Action <M0>)(_ => this.tpsSensitivityXSlider.set_value(0.0f)));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityYResetButton), (Action <M0>)(_ => this.tpsSensitivityYSlider.set_value(0.0f)));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityXResetButton), (Action <M0>)(_ => this.fpsSensitivityXSlider.set_value(0.0f)));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityYResetButton), (Action <M0>)(_ => this.fpsSensitivityYSlider.set_value(0.0f)));
            ObservableExtensions.Subscribe <Unit>(Observable.Merge <Unit>((IObservable <M0>[]) new IObservable <Unit>[4]
            {
                UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityXResetButton),
                UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityYResetButton),
                UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityXResetButton),
                UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityYResetButton)
            }), (Action <M0>)(_ => this.EnterSE()));
            ObservableExtensions.Subscribe <PointerEventData>(Observable.Merge <PointerEventData>((IObservable <M0>[]) new IObservable <PointerEventData>[4]
            {
                ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tpsSensitivityXResetButton),
                ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tpsSensitivityYResetButton),
                ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.fpsSensitivityXResetButton),
                ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.fpsSensitivityYResetButton)
            }), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select)));
        }
 protected override void OnBeforeStart()
 {
     base.OnBeforeStart();
     ObservableExtensions.Subscribe <bool>(Observable.TakeUntilDestroy <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Component)this), (Action <M0>)(x => this.SetActiveControl(x)));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Func <M0, bool>)(_ => this.IsActiveControl)), (Action <M0>)(_ => this.DoClose()));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._sortButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this._sortUI.IsActiveControl = !this._sortUI.IsActiveControl));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._setButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoSetAudio()));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._rightButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoMove(1)));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._leftButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoMove(-1)));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._playButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoPlay()));
     ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._pauseButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.AudioStop()));
     ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._sortToggle), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.ListSort()));
     if (Object.op_Inequality((Object)((Selectable)this._sortToggle).get_targetGraphic(), (Object)null))
     {
         ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._sortToggle), (Action <M0>)(isOn => ((Behaviour)((Selectable)this._sortToggle).get_targetGraphic()).set_enabled(!isOn)));
     }
     this._sortUI.ToggleIndexChanged = (Action <int>)(x => this.ListSort());
     if (!Object.op_Inequality((Object)this._sortSelectedImage, (Object)null))
     {
         return;
     }
     ((Behaviour)this._sortSelectedImage).set_enabled(false);
     ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._sortToggle), (Action <M0>)(_ => ((Behaviour)this._sortSelectedImage).set_enabled(true)));
     ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._sortToggle), (Action <M0>)(_ => ((Behaviour)this._sortSelectedImage).set_enabled(false)));
 }
Beispiel #3
0
 private void Start()
 {
     ObservableExtensions.Subscribe <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglOrder.onValueChanged), (System.Action <M0>)(_isOn =>
     {
         ((Behaviour)this.imgOrder).set_enabled(!_isOn);
         if (this.tglSortDay.get_isOn())
         {
             this.SortDate(_isOn);
         }
         else
         {
             this.SortName(_isOn);
         }
         this.charaSelectScrollView.Init(this.lstFileInfo);
         this.charaSelectScrollView.SetNowSelectToggle();
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S);
     }));
     ((Behaviour)this.imgOrder).set_enabled(!this.tglOrder.get_isOn());
     this.objOrderSelect.SetActiveIfDifferent(false);
     // ISSUE: method pointer
     this.actionOrderSelect.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__1)));
     // ISSUE: method pointer
     this.actionOrderSelect.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__2)));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnSortWindowOpen), (System.Action <M0>)(_ =>
     {
         this.objSortWindow.SetActiveIfDifferent(!this.objSortWindow.get_activeSelf());
         if (this.objSortWindow.get_activeSelf())
         {
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S);
         }
         else
         {
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         }
     }));
     ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnSortWindowOpen), (System.Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select)));
     this.charaSelectScrollView.onSelect = (System.Action <GameCharaFileInfo>)(_data =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S);
         if (this.onChangeItemFunc != null)
         {
             this.onChangeItemFunc(_data);
         }
         if (this.onChangeItem != null)
         {
             this.onChangeItem(true);
         }
         this.SetParameter(_data);
     });
     this.charaSelectScrollView.onDeSelect = (System.Action)(() =>
     {
         if (this.onChangeItem != null)
         {
             this.onChangeItem(false);
         }
         this.objPlayerParameterWindow.SetActiveIfDifferent(false);
         this.objFemaleParameterWindow.SetActiveIfDifferent(false);
     });
     this.objPlayerParameterWindow.SetActiveIfDifferent(false);
     this.txtPlayerCharaName.set_text("NoName");
     this.riPlayerCard.set_texture((Texture)null);
     this.txtPlayerSex.set_text(string.Empty);
     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
         GameLoadCharaListCtrl.\u003CStart\u003Ec__AnonStorey0 startCAnonStorey0 = new GameLoadCharaListCtrl.\u003CStart\u003Ec__AnonStorey0();
         // ISSUE: reference to a compiler-generated field
         startCAnonStorey0.\u0024this = this;
         // ISSUE: reference to a compiler-generated field
         startCAnonStorey0.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>(startCAnonStorey0.\u003C\u003Em__0)), (System.Action <M0>) new System.Action <bool>(startCAnonStorey0.\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
         GameLoadCharaListCtrl.\u003CStart\u003Ec__AnonStorey1 startCAnonStorey1 = new GameLoadCharaListCtrl.\u003CStart\u003Ec__AnonStorey1();
         // ISSUE: reference to a compiler-generated field
         startCAnonStorey1.\u0024this = this;
         // ISSUE: reference to a compiler-generated field
         startCAnonStorey1.sel = index;
         // ISSUE: method pointer
         this.actionStateSelects[index].listActionEnter.Add(new UnityAction((object)startCAnonStorey1, __methodptr(\u003C\u003Em__0)));
         // ISSUE: method pointer
         this.actionStateSelects[index].listActionExit.Add(new UnityAction((object)startCAnonStorey1, __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("--------------------");
     }
     this.objSortWindow.SetActiveIfDifferent(false);
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnSortWindowClose), (System.Action <M0>)(_ =>
     {
         Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
         this.objSortWindow.SetActiveIfDifferent(false);
     }));
     ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnSortWindowClose), (System.Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select)));
     // ISSUE: method pointer
     this.actionSortDay.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__9)));
     // ISSUE: method pointer
     this.actionSortDay.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__A)));
     // ISSUE: method pointer
     this.actionSortName.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__B)));
     // ISSUE: method pointer
     this.actionSortName.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__C)));
     this.objSortDaySelect.SetActiveIfDifferent(false);
     this.objSortNameSelect.SetActiveIfDifferent(false);
     if (Object.op_Implicit((Object)this.tglSortDay))
     {
         ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglSortDay.onValueChanged), (Func <M0, bool>)(_ => this.sortSelectNum != 0)), (System.Action <M0>)(_isOn =>
         {
             if (!_isOn)
             {
                 return;
             }
             this.sortSelectNum = 0;
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S);
             this.SortDate(this.tglOrder.get_isOn());
             this.charaSelectScrollView.Init(this.lstFileInfo);
             this.charaSelectScrollView.SetNowSelectToggle();
         }));
     }
     if (Object.op_Implicit((Object)this.tglSortName))
     {
         ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglSortName.onValueChanged), (Func <M0, bool>)(_ => this.sortSelectNum != 1)), (System.Action <M0>)(_isOn =>
         {
             if (!_isOn)
             {
                 return;
             }
             this.sortSelectNum = 1;
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S);
             this.SortName(this.tglOrder.get_isOn());
             this.charaSelectScrollView.Init(this.lstFileInfo);
             this.charaSelectScrollView.SetNowSelectToggle();
         }));
     }
     this.LoadSkillList();
     this.LoadHSkillList();
 }
        protected override void Start()
        {
            if (!Application.get_isPlaying())
            {
                return;
            }
            this._toggles = (Toggle[])((Component)this).GetComponentsInChildren <Toggle>(true);
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._isOpen, (Action <M0>)(isOn =>
            {
                if (!isOn)
                {
                    ((ReactiveProperty <int>) this._selectedID).set_Value(-1);
                    this.playSE.Play(SoundPack.SystemSE.Cancel);
                }
                this.OpenCloseAnimation(isOn);
            }));
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._selectedID, (Action <M0>)(x =>
            {
                Toggle element = this._toggles.GetElement <Toggle>(x);
                if (Object.op_Equality((Object)element, (Object)null))
                {
                    this._selectedOptionInstance = (Toggle)null;
                }
                else
                {
                    this._selectedOptionInstance = element;
                }
            }));
            this.cursorCG.set_alpha(1f);
            ((Behaviour)this._cursor).set_enabled(false);
            ColorBlock colors = ((Selectable)this._close).get_colors();

            ((ColorBlock) ref colors).set_highlightedColor(Define.Get(Colors.Green));
            ((Selectable)this._close).set_colors(colors);
            DisposableExtensions.AddTo <CompositeDisposable>((M0)((IEnumerable <Selectable>) this._toggles).BindToEnter(true, this._cursor), (Component)this);
            DisposableExtensions.AddTo <IDisposable>((M0)((IEnumerable <Toggle>) this._toggles).BindToGroup((Action <int>)(type => ((ReactiveProperty <int>) this._sortType).set_Value(type))), (Component)this);
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._sortType, (Action <M0>)(type =>
            {
                if (this.TypeChanged != null)
                {
                    this.TypeChanged(type);
                }
                this.playSE.Play(SoundPack.SystemSE.OK_S);
            }));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._close), (Action <M0>)(_ => this.OnInputCancel()));
            Image component = (Image)((Component)this).GetComponent <Image>();

            if (Object.op_Inequality((Object)component, (Object)null))
            {
                ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)component), (Func <M0, bool>)(_ => ((ReactiveProperty <bool>) this._isOpen).get_Value())), (Action <M0>)(_ =>
                {
                    if (this.OnEntered == null)
                    {
                        return;
                    }
                    this.OnEntered();
                }));
            }
            // ISSUE: object of a compiler-generated type is created
            using (IEnumerator <\u003C\u003E__AnonType23 <Selectable, int> > enumerator = ((IEnumerable <Selectable>) new Selectable[1]
            {
                (Selectable)this._close
            }).Concat <Selectable>((IEnumerable <Selectable>) this._toggles).Select <Selectable, \u003C\u003E__AnonType23 <Selectable, int> >((Func <Selectable, int, \u003C\u003E__AnonType23 <Selectable, int> >)((o, index) => new \u003C\u003E__AnonType23 <Selectable, int>(o, index - 1))).GetEnumerator())
            {
                while (((IEnumerator)enumerator).MoveNext())
                {
                    // ISSUE: variable of a compiler-generated type
                    \u003C\u003E__AnonType23 <Selectable, int> item = enumerator.Current;
                    ItemSortUI itemSortUi = this;
                    ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <PointerEventData, int>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)item.o), (Func <M0, M1>)(_ => item.index)), (Action <M0>)(index =>
                    {
                        ((ReactiveProperty <int>)itemSortUi._selectedID).set_Value(index);
                        if (itemSortUi.OnEntered == null)
                        {
                            return;
                        }
                        itemSortUi.OnEntered();
                    }));
                }
            }
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

            // ISSUE: method pointer
            actionIdDownCommand1.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__B)));
            this._actionCommands.Add(actionIdDownCommand1);
            ActionIDDownCommand actionIdDownCommand2 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__C)));
            this._actionCommands.Add(actionIdDownCommand2);
            ActionIDDownCommand actionIdDownCommand3 = new ActionIDDownCommand()
            {
                ActionID = ActionID.MouseRight
            };

            // ISSUE: method pointer
            actionIdDownCommand3.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__D)));
            this._actionCommands.Add(actionIdDownCommand3);
            base.Start();
            this.playSE.use = true;
        }