protected override void Start()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            ((MonoBehaviour)this).StartCoroutine(this.BindingUI());
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

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

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

            // ISSUE: method pointer
            actionIdDownCommand3.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__4)));
            this._actionCommands.Add(actionIdDownCommand3);
            base.Start();
        }
        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 Start()
        {
            // ISSUE: method pointer
            ((UnityEvent)this._addButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__0)));
            // ISSUE: method pointer
            ((UnityEvent)this._subButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__1)));
            // ISSUE: method pointer
            this._dropdown.OnValueChanged.AddListener(new UnityAction <int>((object)this, __methodptr(\u003CStart\u003Em__2)));
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

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

            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__4)));
            this._actionCommands.Add(actionIdDownCommand2);
            base.Start();
        }
Example #4
0
        protected override void Start()
        {
            if (!Application.get_isPlaying())
            {
                return;
            }
            ((Component)this.itemParent).get_gameObject().Children().ForEach((Action <GameObject>)(go => Object.Destroy((Object)go)));
            ObservableExtensions.Subscribe <int>(Observable.Where <int>((IObservable <M0>) this._selectedID, (Func <M0, bool>)(_ => Singleton <Resources> .IsInstance())), (Action <M0>)(index =>
            {
                ItemNodeUI itemNodeUi;
                this._optionTable.TryGetValue(index, ref itemNodeUi);
                this.SelectedOption = itemNodeUi;
                if (Object.op_Equality((Object)itemNodeUi, (Object)null) || this.SelectChanged == null)
                {
                    return;
                }
                this.SelectChanged(index, itemNodeUi);
            }));
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._currentID, (Action <M0>)(index =>
            {
                ItemNodeUI itemNodeUi;
                this._optionTable.TryGetValue(index, ref itemNodeUi);
                this.CurrentOption = itemNodeUi;
                if (this.CurrentChanged != null)
                {
                    this.CurrentChanged(index, itemNodeUi);
                }
                if (index < 0)
                {
                    return;
                }
                this.playSE.Play(SoundPack.SystemSE.OK_S);
            }));
            this.disposable = ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (Action <M0>)(_ => this.OnUpdate()));
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

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

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

            // ISSUE: method pointer
            actionIdDownCommand3.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__11)));
            this._actionCommands.Add(actionIdDownCommand3);
            base.Start();
        }
        protected override void Start()
        {
            if (Object.op_Equality((Object)this._countViewer, (Object)null))
            {
                ((MonoBehaviour)this).StartCoroutine(this.LoadCountViewer());
            }
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            ObservableExtensions.Subscribe <ItemNodeUI>((IObservable <M0>) this.selectionItem, (Action <M0>)(node =>
            {
                this._hasItemNode = Object.op_Inequality((Object)node, (Object)null);
                if (this._hasItemNode)
                {
                    this.IsActiveControl = true;
                    this.Refresh(node.Item);
                }
                else
                {
                    if (!this.isOpen)
                    {
                        return;
                    }
                    this.IsActiveControl = false;
                }
            }));
            ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (Action <M0>)(_ => this.OnUpdate()));
            ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <bool, int>((IObservable <M0>) this._takeout, (Func <M0, M1>)(isOn => isOn ? 1 : 0)), (Action <M0>)(index => ((Selectable)this._sendButton).get_image().set_sprite(this._sprites.GetElement <Sprite>(index))));
            ((MonoBehaviour)this).StartCoroutine(this.SlotBind());
            ObservableExtensions.Subscribe <int>(Observable.Merge <int>((IObservable <M0>[]) new IObservable <int>[2]
            {
                (IObservable <int>)Observable.Select <PointerEventData, int>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._sendButton), (Func <M0, M1>)(_ => 0)),
                (IObservable <int>)Observable.Select <PointerEventData, int>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._removeButton), (Func <M0, M1>)(_ => 1))
            }), (Action <M0>)(id => ((ReactiveProperty <int>) this._selectID).set_Value(id)));
            ObservableExtensions.Subscribe <RectTransform>(Observable.Where <RectTransform>((IObservable <M0>)Observable.Select <int, RectTransform>((IObservable <M0>) this._selectID, (Func <M0, M1>)(i =>
            {
                if (i == 0)
                {
                    return((RectTransform)((Component)this._sendButton).GetComponent <RectTransform>());
                }
                return(i == 1 ? (RectTransform)((Component)this._removeButton).GetComponent <RectTransform>() : (RectTransform)null);
            })), (Func <M0, bool>)(rt => Object.op_Inequality((Object)rt, (Object)null))), (Action <M0>)(rt => CursorFrame.Set(((Graphic)this.cursor).get_rectTransform(), rt, (RectTransform)null)));
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

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

            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__12)));
            this._actionCommands.Add(actionIdDownCommand2);
            base.Start();
        }
        protected override void OnBeforeStart()
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            CommCommandList.\u003COnBeforeStart\u003Ec__AnonStorey9 startCAnonStorey9 = new CommCommandList.\u003COnBeforeStart\u003Ec__AnonStorey9();
            // ISSUE: reference to a compiler-generated field
            startCAnonStorey9.\u0024this = this;
            if (!Application.get_isPlaying())
            {
                return;
            }
            this._scrollCylinder.enableInternalScroll = false;
            // ISSUE: reference to a compiler-generated method
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>) new Action <bool>(startCAnonStorey9.\u003C\u003Em__0));
            // ISSUE: reference to a compiler-generated method
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this.OnSelectIDChagnedAsObservable(), (Action <M0>) new Action <int>(startCAnonStorey9.\u003C\u003Em__1));
            IConnectableObservable <long> iconnectableObservable = (IConnectableObservable <long>)Observable.Publish <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()));

            iconnectableObservable.Connect();
            // ISSUE: reference to a compiler-generated method
            // ISSUE: reference to a compiler-generated method
            ObservableExtensions.Subscribe <long>(Observable.Where <long>((IObservable <M0>)iconnectableObservable, (Func <M0, bool>) new Func <long, bool>(startCAnonStorey9.\u003C\u003Em__2)), (Action <M0>) new Action <long>(startCAnonStorey9.\u003C\u003Em__3));
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

            // ISSUE: method pointer
            actionIdDownCommand1.TriggerEvent.AddListener(new UnityAction((object)startCAnonStorey9, __methodptr(\u003C\u003Em__4)));
            this._actionCommands.Add(actionIdDownCommand1);
            ActionIDDownCommand actionIdDownCommand2 = new ActionIDDownCommand()
            {
                ActionID = ActionID.MouseRight
            };

            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)startCAnonStorey9, __methodptr(\u003C\u003Em__5)));
            this._actionCommands.Add(actionIdDownCommand2);
            this._nodePool = new CommCommandList.NodePool()
            {
                Source = ((Component)this._node).get_gameObject()
            };
            // ISSUE: reference to a compiler-generated field
            startCAnonStorey9.iconTable = Singleton <Resources> .Instance.itemIconTables;
            // ISSUE: reference to a compiler-generated field
            startCAnonStorey9.commonDefine = Singleton <Resources> .Instance.CommonDefine;
            // ISSUE: reference to a compiler-generated method
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Singleton <Resources> .Instance.LoadMapResourceStream, (Action <M0>) new Action <Unit>(startCAnonStorey9.\u003C\u003Em__6));
        }
Example #7
0
        protected override void Start()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            if (Object.op_Inequality((Object)this._enterButton, (Object)null))
            {
                ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._enterButton), (Action <M0>)(_ => this.OnInputSubmit()));
            }
            if (Object.op_Inequality((Object)this._closeButton, (Object)null))
            {
                ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Action <M0>)(_ => this.OnInputCancel()));
            }
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

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

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

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

            // ISSUE: method pointer
            actionIdDownCommand4.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__6)));
            this._actionCommands.Add(actionIdDownCommand4);
            base.Start();
        }
        protected override void Start()
        {
            if (Object.op_Equality((Object)this._countViewer, (Object)null))
            {
                ((MonoBehaviour)this).StartCoroutine(this.LoadCountViewer());
            }
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            ObservableExtensions.Subscribe <ItemNodeUI>((IObservable <M0>) this.selectionItem, (Action <M0>)(node =>
            {
                this._hasItemNode = Object.op_Inequality((Object)node, (Object)null);
                if (this._hasItemNode)
                {
                    this.IsActiveControl = true;
                    this.Refresh(node.Item);
                }
                else
                {
                    if (!this.isOpen)
                    {
                        return;
                    }
                    this.IsActiveControl = false;
                }
            }));
            ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (Action <M0>)(_ => this.OnUpdate()));
            ObservableExtensions.Subscribe <ShopInfoPanelUI.Mode>((IObservable <M0>) this._mode, (Action <M0>)(mode => this._backGround.set_sprite(this._backGrounds.GetElement <Sprite>((int)mode))));
            ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <bool, int>((IObservable <M0>) this._decide, (Func <M0, M1>)(isOn => isOn ? 0 : 1)), (Action <M0>)(index => ((Selectable)this._decideButton).get_image().set_sprite(this._sprites.GetElement <Sprite>(index))));
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Submit
            };

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

            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__A)));
            this._actionCommands.Add(actionIdDownCommand2);
            base.Start();
        }
Example #9
0
        protected override void Start()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            this._updateDisposable = ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.Where <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => this.isOpen)), (Func <M0, bool>)(_ => Object.op_Inequality((Object)this._icon, (Object)null))), (Func <M0, bool>)(_ => !((ReactiveProperty <bool>) this._finished).get_Value())), (Action <M0>)(_ => this.OnUpdate()));
            if (Object.op_Inequality((Object)this._cancelButton, (Object)null))
            {
                ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._cancelButton), (Action <M0>)(_ => this.OnInputSubmit()));
            }
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

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

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

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

            // ISSUE: method pointer
            actionIdDownCommand4.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__A)));
            this._actionCommands.Add(actionIdDownCommand4);
            base.Start();
        }
Example #10
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());
        }
Example #11
0
        protected override void Start()
        {
            this._canvasGroup.set_alpha(1f);
            ((MonoBehaviour)this).StartCoroutine(this.BindingUI());
            this.IsActiveControl = true;
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

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

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

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

            // ISSUE: method pointer
            actionIdDownCommand4.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__4)));
            this._actionCommands.Add(actionIdDownCommand4);
            base.Start();
        }
Example #12
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));
        }
Example #13
0
        protected override void Start()
        {
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x)));
            if (Object.op_Inequality((Object)this._closeButton, (Object)null))
            {
                ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Action <M0>)(_ =>
                {
                    this.playSE.Play(SoundPack.SystemSE.Cancel);
                    this.OnInputCancel();
                }));
            }
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._currentIndex, (Action <M0>)(x =>
            {
                bool flag1 = x >= 0;
                ((Component)this._currentCursor).get_gameObject().SetActive(flag1);
                if (flag1)
                {
                    CursorFrame.Set((RectTransform)((Component)this._currentCursor).GetComponent <RectTransform>(), (RectTransform)((Component)this._chickens[x].toggle).GetComponent <RectTransform>(), (RectTransform)null);
                    if (this.IconChanged != null)
                    {
                        this.IconChanged(x);
                    }
                }
                bool flag2 = this.GetChickenInfo(x) != null;
                ((Selectable)this._escapeButton).set_interactable(flag2);
                if (flag2)
                {
                    return;
                }
                this._nameChangeUI.Close();
            }));
            DisposableExtensions.AddTo <CompositeDisposable>((M0)((IEnumerable <Selectable>)((IEnumerable <ChickenCoopListUI.Chicken>) this._chickens).Select <ChickenCoopListUI.Chicken, Toggle>((Func <ChickenCoopListUI.Chicken, Toggle>)(p => p.toggle))).BindToEnter(true, this._selectCursor), (Component)this);
            DisposableExtensions.AddTo <IDisposable>((M0)((IEnumerable <ChickenCoopListUI.Chicken>) this._chickens).Select <ChickenCoopListUI.Chicken, Toggle>((Func <ChickenCoopListUI.Chicken, Toggle>)(p => p.toggle)).BindToGroup((Action <int>)(sel => ((ReactiveProperty <int>) this._currentIndex).set_Value(sel))), (Component)this);
            this._nameChangeUI.OnSubmit += (Action)(() =>
            {
                this.playSE.Play(SoundPack.SystemSE.OK_S);
                AIProject.SaveData.Environment.ChickenInfo chickenInfo = this.GetChickenInfo(this._nameChangeIndex);
                this._chickens[this._nameChangeIndex].name.set_text(chickenInfo?.name ?? string.Empty);
                this.NameChanged(chickenInfo);
            });
            this._nameChangeUI.OnCancel += (Action)(() => this.playSE.Play(SoundPack.SystemSE.Cancel));
            // ISSUE: object of a compiler-generated type is created
            foreach (\u003C\u003E__AnonType18 <ChickenCoopListUI.Chicken, int> anonType18 in ((IEnumerable <ChickenCoopListUI.Chicken>) this._chickens).Select <ChickenCoopListUI.Chicken, \u003C\u003E__AnonType18 <ChickenCoopListUI.Chicken, int> >((Func <ChickenCoopListUI.Chicken, int, \u003C\u003E__AnonType18 <ChickenCoopListUI.Chicken, int> >)((p, i) => new \u003C\u003E__AnonType18 <ChickenCoopListUI.Chicken, int>(p, i))))
            {
                // ISSUE: variable of a compiler-generated type
                \u003C\u003E__AnonType18 <ChickenCoopListUI.Chicken, int> item = anonType18;
                ChickenCoopListUI chickenCoopListUi = this;
                DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <Unit, int>((IObservable <M0>)item.p.NameChange, (Func <M0, M1>)(_ => item.i)), (Action <M0>)(index =>
                {
                    chickenCoopListUi.playSE.Play(SoundPack.SystemSE.OK_S);
                    chickenCoopListUi._nameChangeIndex = index;
                    chickenCoopListUi._nameChangeUI.Open(chickenCoopListUi.GetChickenInfo(index));
                })), (Component)this);
            }
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

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

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

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

            // ISSUE: method pointer
            actionIdDownCommand4.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__E)));
            this._actionCommands.Add(actionIdDownCommand4);
            base.Start();
        }
Example #14
0
        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;
        }