public void Init()
    {
        this.Input = Singleton <Input> .Instance;
        if (this.CategoryFilterID != null)
        {
            ((ReactiveProperty <int>) this.CategoryFilterID).Dispose();
        }
        ObservableExtensions.Subscribe <int>((IObservable <M0>) this.CategoryFilterID, (Action <M0>)(x => ((Component)this.Cursor).get_transform().set_position(((Component)this.actionFilter.ActionToggles[x]).get_transform().get_position())));
        for (int index = 0; index < this.actionFilter.ActionToggles.Length; ++index)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            MapActionCategoryUI.\u003CInit\u003Ec__AnonStorey0 initCAnonStorey0 = new MapActionCategoryUI.\u003CInit\u003Ec__AnonStorey0();
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey0.\u0024this = this;
            // ISSUE: reference to a compiler-generated field
            initCAnonStorey0.id = index;
            // ISSUE: reference to a compiler-generated field
            PointerEnterTrigger pointerEnterTrigger = (PointerEnterTrigger)((Component)this.actionFilter.ActionToggles[initCAnonStorey0.id]).get_gameObject().GetComponent <PointerEnterTrigger>();
            if (Object.op_Equality((Object)pointerEnterTrigger, (Object)null))
            {
                // ISSUE: reference to a compiler-generated field
                pointerEnterTrigger = (PointerEnterTrigger)((Component)this.actionFilter.ActionToggles[initCAnonStorey0.id]).get_gameObject().AddComponent <PointerEnterTrigger>();
            }
            UITrigger.TriggerEvent triggerEvent = new UITrigger.TriggerEvent();
            if (((UITrigger)pointerEnterTrigger).get_Triggers().Count > 0)
            {
                ((UITrigger)pointerEnterTrigger).get_Triggers().Clear();
            }
            ((UITrigger)pointerEnterTrigger).get_Triggers().Add(triggerEvent);
            // ISSUE: method pointer
            ((UnityEvent <BaseEventData>)triggerEvent).AddListener(new UnityAction <BaseEventData>((object)initCAnonStorey0, __methodptr(\u003C\u003Em__0)));
        }
        if (this.Dispose != null)
        {
            this.Dispose.Dispose();
        }
        this.Dispose = ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => this.Input.FocusLevel == this.FocusLevel)), (Action <M0>)(_ => this.OnUpdate()));
        ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
        {
            ActionID = ActionID.Submit
        };

        // ISSUE: method pointer
        actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__3)));
        this._actionCommands.Clear();
        this._actionCommands.Add(actionIdDownCommand);
        this.Start();
    }
示例#2
0
        protected override void Start()
        {
            DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x))), (Component)this);
            DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Action <M0>)(_ => this.DoClose())), (Component)this);
            ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
            {
                ActionID = ActionID.Cancel
            };

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

            // ISSUE: method pointer
            keyCodeDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__4)));
            this._keyCommands.Add(keyCodeDownCommand);
            if (!this._toggleElements.IsNullOrEmpty <ToggleElement>())
            {
                for (int index = 0; index < this._toggleElements.Count; ++index)
                {
                    ToggleElement element = this._toggleElements.GetElement <ToggleElement>(index);
                    Toggle        toggle  = element == null ? (Toggle)null : element.Toggle;
                    if (!Object.op_Equality((Object)toggle, (Object)null))
                    {
                        element.Index = index;
                        element.Start();
                        DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(Observable.DistinctUntilChanged <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(toggle)), (Func <M0, bool>)(flag => flag)), (Action <M0>)(_ =>
                        {
                            this.ChangedSelecteInventory(element.Index);
                            this.PlaySE(SoundPack.SystemSE.OK_S);
                        })), (Component)toggle);
                    }
                }
            }
            DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <StuffItem>(Observable.Where <StuffItem>((IObservable <M0>) this._decidedItemSlotUI.CreateEvent, (Func <M0, bool>)(item => item != null)), (Action <M0>)(item => this._createItemStockUI.AddItem(item))), (Component)this);
            base.Start();
            this.CanvasAlpha = 0.0f;
            bool flag1 = false;

            this.Interactable = flag1;
            this.BlockRaycast = flag1;
            this.SetEnabledInputAll(false);
        }
示例#3
0
        protected override void Start()
        {
            this._runButton.AddListener((Action)(() => this.Exit()));
            this._runButton.AddListener((Action)(() =>
            {
                if (!Singleton <Resources> .IsInstance())
                {
                    return;
                }
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
            }));
            this._runButton.AddListener((Action)(() => this.DisableRaycast()));
            this._cancelButton.AddListener((Action)(() => this.Cancel()));
            this._cancelButton.AddListener((Action)(() =>
            {
                if (!Singleton <Resources> .IsInstance())
                {
                    return;
                }
                Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel);
            }));
            this._cancelButton.AddListener((Action)(() => this.DisableRaycast()));
            this.Open();
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand();

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

            actionIdDownCommand2.ActionID = ActionID.Cancel;
            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__7)));
            this._actionCommands.Add(actionIdDownCommand2);
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._selectedID, (Action <M0>)(x => this.UpdateSelectedFrame(x)));
            this.UpdateSelectedFrame(1);
            // ISSUE: method pointer
            this._runButton.OnPointerEnterEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__9)));
            // ISSUE: method pointer
            this._cancelButton.OnPointerEnterEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__A)));
            base.Start();
        }
示例#4
0
    public void Init()
    {
        this.Input = Singleton <Input> .Instance;
        ObservableExtensions.Subscribe <int>((IObservable <M0>) this.WarpID, (Action <M0>)(x =>
        {
            if (x == 0)
            {
                ((Behaviour)this.Cursor[0]).set_enabled(true);
                ((Behaviour)this.Cursor[1]).set_enabled(false);
            }
            else
            {
                if (x <= 0)
                {
                    return;
                }
                ((Behaviour)this.Cursor[0]).set_enabled(false);
                ((Behaviour)this.Cursor[1]).set_enabled(true);
            }
        }));
        this.disposable = ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => this.Input.FocusLevel == this.FocusLevel)), (Action <M0>)(_ => this.OnUpdate()));
        PointerEnterTrigger pointerEnterTrigger = (PointerEnterTrigger)((Component)this.areaMapUI._WorldMap).get_gameObject().GetComponent <PointerEnterTrigger>();

        if (Object.op_Equality((Object)pointerEnterTrigger, (Object)null))
        {
            pointerEnterTrigger = (PointerEnterTrigger)((Component)this.areaMapUI._WorldMap).get_gameObject().AddComponent <PointerEnterTrigger>();
        }
        UITrigger.TriggerEvent triggerEvent = new UITrigger.TriggerEvent();
        ((UITrigger)pointerEnterTrigger).get_Triggers().Add(triggerEvent);
        // ISSUE: method pointer
        ((UnityEvent <BaseEventData>)triggerEvent).AddListener(new UnityAction <BaseEventData>((object)this, __methodptr(\u003CInit\u003Em__3)));
        ActionIDDownCommand actionIdDownCommand = new ActionIDDownCommand()
        {
            ActionID = ActionID.Submit
        };

        // ISSUE: method pointer
        actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CInit\u003Em__4)));
        this._actionCommands.Add(actionIdDownCommand);
        this.Start();
    }
示例#5
0
        private void Start()
        {
            this._objectPool.Source  = this._labelNode;
            this._subjectPool.Source = this._subjectLabelNode;
            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 actionIdDownCommand = new ActionIDDownCommand()
            {
                ActionID = ActionID.Action
            };

            // ISSUE: method pointer
            actionIdDownCommand.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__2)));
            this._actionTriggerCommands.Add(actionIdDownCommand);
            ActionIDCommand actionIdCommand = new ActionIDCommand()
            {
                ActionID = ActionID.Action
            };

            // ISSUE: method pointer
            actionIdCommand.TriggerEvent.AddListener(new UnityAction <bool>((object)this, __methodptr(\u003CStart\u003Em__3)));
            this._actionCommands.Add(actionIdCommand);
        }
示例#6
0
        protected override void Start()
        {
            this._back.set_sprite(ConfirmScene.Sprite);
            this._runButton.AddListener((Action)(() =>
            {
                Action onClickedYes = ConfirmScene.OnClickedYes;
                if (onClickedYes == null)
                {
                    return;
                }
                onClickedYes();
            }));
            this._runButton.AddListener((Action)(() => this.DisableRaycast()));
            this._cancelButton.AddListener((Action)(() => this.DisableRaycast()));
            this._cancelButton.AddListener((Action)(() =>
            {
                Action onClickedNo = ConfirmScene.OnClickedNo;
                if (onClickedNo == null)
                {
                    return;
                }
                onClickedNo();
            }));
            this._runButton.AddListener((Action)(() => this.Close()));
            this._cancelButton.AddListener((Action)(() => this.Close()));
            this.Open();
            this._sentenceText.set_text(ConfirmScene.Sentence);
            if (ConfirmScene.YesTextFunc != null)
            {
                this._yesText.set_text(ConfirmScene.YesTextFunc());
            }
            if (ConfirmScene.NoTextFunc != null)
            {
                this._noText.set_text(ConfirmScene.NoTextFunc());
            }
            if (ConfirmScene.BackAlpha.HasValue)
            {
                float num   = ConfirmScene.BackAlpha.Value;
                Color color = ((Graphic)this._panel).get_color();
                color.a = (__Null)(double)num;
                ((Graphic)this._panel).set_color(color);
                ((Behaviour)this._sentenceTextBack).set_enabled((double)num <= 0.0);
            }
            else
            {
                ((Behaviour)this._sentenceTextBack).set_enabled(false);
            }
            if (ConfirmScene.Offset.HasValue)
            {
                this._offsetTarget.set_anchoredPosition(Vector2.op_Addition(this._offsetTarget.get_anchoredPosition(), ConfirmScene.Offset.Value));
            }
            base.Start();
            ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand();

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

            actionIdDownCommand2.ActionID = ActionID.Cancel;
            // ISSUE: method pointer
            actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__7)));
            this._actionCommands.Add(actionIdDownCommand2);
            ObservableExtensions.Subscribe <int>((IObservable <M0>) this._selectedID, (Action <M0>)(x => this.UpdateSelectedFrame(x)));
            this.UpdateSelectedFrame(1);
            // ISSUE: method pointer
            this._runButton.OnPointerEnterEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__9)));
            // ISSUE: method pointer
            this._cancelButton.OnPointerEnterEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__A)));
            base.Start();
        }