示例#1
0
 private void OnButtonEvent(bool isForce, object obj)
 {
     if (!isForce && ((CriticalSection.GetActive() & this.CSMask) != (CriticalSections)0 || UnityEngine.Object.op_Inequality((UnityEngine.Object)HomeWindow.Current, (UnityEngine.Object)null) && HomeWindow.Current.IsSceneChanging))
     {
         return;
     }
     if (this.DoLock)
     {
         ButtonEvent.Lock(this.LockKey);
     }
     FlowNode_ButtonEvent.currentValue = obj;
     this.ActivateOutputLinks(1);
 }
示例#2
0
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 1:
                ButtonEvent.Lock(this.LockKey);
                break;

            case 2:
                ButtonEvent.UnLock(this.LockKey);
                break;

            case 3:
                ButtonEvent.ResetLock(this.LockKey);
                break;

            case 4:
                ButtonEvent.Reset();
                break;
            }
            this.ActivateOutputLinks(10);
        }
示例#3
0
 public static void Lock()
 {
     ButtonEvent.Lock("system");
 }
        private void Initalize()
        {
            if (this.IsInialize)
            {
                this.RefreshIcons(true);
                if (this.IsFinishedBonus)
                {
                    return;
                }
                ButtonEvent.Lock("gacha_initialize");
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 60);
            }
            else
            {
                if (GachaResultData.drops == null)
                {
                    return;
                }
                if (GachaResultData.IsRedrawGacha)
                {
                    GlobalEvent.Invoke("DISABLE_HOME_BUTTON", (object)this);
                }
                this.mRequest = (GachaRequestParam)null;
                GachaRequestParam dataOfClass = DataSource.FindDataOfClass <GachaRequestParam>(((Component)this).get_gameObject(), (GachaRequestParam)null);
                if (dataOfClass != null)
                {
                    this.mRequest = dataOfClass;
                }
                this.SetDetailActiveStatus(false);
                this.is_gift = this.CheckIsGiftData(GachaResultData.drops);
                for (int index = 0; index < GachaResultData.drops.Length; ++index)
                {
                    if (GachaResultData.drops[index].type == GachaDropData.Type.Unit)
                    {
                        MonoSingleton <GameManager> .Instance.Player.UpdateUnitTrophyStates(false);

                        break;
                    }
                }
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_OnemoreBtn, (UnityEngine.Object)null))
                {
                    this.RefreshGachaCostObject(((Component)this.m_OnemoreBtn).get_gameObject());
                    ((Component)this.m_OnemoreBtn).get_gameObject().SetActive(GachaResultData.UseOneMore && !GachaResultData.IsRedrawGacha);
                }
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_BonusBtn, (UnityEngine.Object)null))
                {
                    ((Component)this.m_BonusBtn).get_gameObject().SetActive(GachaResultData.dropMails != null && GachaResultData.dropMails.Length > 0);
                }
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_RedrawBtn, (UnityEngine.Object)null))
                {
                    SerializeValueBehaviour component = (SerializeValueBehaviour)((Component)this.m_RedrawBtn).GetComponent <SerializeValueBehaviour>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                    {
                        GameObject gameObject = component.list.GetGameObject("option");
                        if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null))
                        {
                            gameObject.SetActive(GachaResultData.IsPending);
                        }
                        Text uiLabel = component.list.GetUILabel("txt_count");
                        if (UnityEngine.Object.op_Inequality((UnityEngine.Object)uiLabel, (UnityEngine.Object)null))
                        {
                            string empty;
                            if (GachaResultData.IsPending)
                            {
                                empty = LocalizedText.Get("sys.GACHA_REDRAW_COUNT_LIMIT", new object[1]
                                {
                                    (object)GachaResultData.RedrawRest
                                });
                            }
                            else
                            {
                                empty = string.Empty;
                            }
                            string str = empty;
                            uiLabel.set_text(str);
                        }
                    }
                    ((Component)this.m_RedrawBtn).get_gameObject().SetActive(GachaResultData.IsRedrawGacha);
                    ((Selectable)this.m_RedrawBtn).set_interactable(GachaResultData.IsPending && GachaResultData.RedrawRest > 0);
                }
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_DefaultBtn, (UnityEngine.Object)null))
                {
                    SerializeValueBehaviour component = (SerializeValueBehaviour)((Component)this.m_DefaultBtn).GetComponent <SerializeValueBehaviour>();
                    if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                    {
                        component.list.GetUILabel("text").set_text(!GachaResultData.IsPending ? LocalizedText.Get("sys.BTN_GACHA_OK") : LocalizedText.Get("sys.BTN_DECIDE_CONFIRM"));
                    }
                }
                this.Refresh();
                this.m_inialize = true;
            }
        }