コード例 #1
0
        public void UnlockContents()
        {
            if (!this.mDesiredSceneIsHome || this.mDesirdSceneSet || ((CriticalSection.GetActive() & CriticalSections.SceneChange) != (CriticalSections)0 || !PlayerPrefs.HasKey("lastplv")) || !PlayerPrefs.HasKey("lastviplv"))
            {
                return;
            }
            PlayerData player  = MonoSingleton <GameManager> .Instance.Player;
            int        num1    = PlayerPrefs.GetInt("lastplv");
            int        lv      = player.Lv;
            int        num2    = PlayerPrefs.GetInt("lastviplv");
            int        vipRank = player.VipRank;

            if (num1 >= lv && num2 >= vipRank)
            {
                return;
            }
            foreach (UnlockParam unlock in MonoSingleton <GameManager> .Instance.MasterParam.Unlocks)
            {
                if ((unlock.PlayerLevel == 0 || num1 < unlock.PlayerLevel && unlock.PlayerLevel <= lv) && (unlock.VipRank == 0 || num2 < unlock.VipRank && unlock.VipRank <= vipRank))
                {
                    NotifyList.PushContentsUnlock(unlock);
                }
            }
            PlayerPrefs.SetInt("lastplv", lv);
            PlayerPrefs.SetInt("lastviplv", vipRank);
            LevelLock.UpdateLockStates();
        }
コード例 #2
0
 private void Start()
 {
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Input, (UnityEngine.Object)null))
     {
         // ISSUE: method pointer
         ((UnityEvent <string>) this.Input.get_onValueChanged()).AddListener(new UnityAction <string>((object)this, __methodptr(OnInputFieldChange)));
     }
     if (this.ExtraInput != null)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         UIValidator.\u003CStart\u003Ec__AnonStorey2B9 startCAnonStorey2B9 = new UIValidator.\u003CStart\u003Ec__AnonStorey2B9();
         // ISSUE: reference to a compiler-generated field
         startCAnonStorey2B9.\u003C\u003Ef__this = this;
         foreach (InputField inputField in this.ExtraInput)
         {
             // ISSUE: reference to a compiler-generated field
             startCAnonStorey2B9.i = inputField;
             // ISSUE: reference to a compiler-generated field
             // ISSUE: method pointer
             ((UnityEvent <string>)startCAnonStorey2B9.i.get_onValueChanged()).AddListener(new UnityAction <string>((object)startCAnonStorey2B9, __methodptr(\u003C\u003Em__287)));
         }
     }
     this.UpdateInteractable(CriticalSection.GetActive());
 }
コード例 #3
0
ファイル: HomeWindow.cs プロジェクト: zunaalabaya/TAC-BOT
 public void FgGIDLoginCheck()
 {
     if (!this.mDesiredSceneIsHome || this.mDesirdSceneSet || ((CriticalSection.GetActive() & CriticalSections.SceneChange) != (CriticalSections)0 || MonoSingleton <GameManager> .Instance.AuthStatus != ReqFgGAuth.eAuthStatus.Synchronized))
     {
         return;
     }
     MonoSingleton <GameManager> .Instance.Player.OnFgGIDLogin();
 }
コード例 #4
0
 private void Start()
 {
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Input, (UnityEngine.Object)null))
     {
         // ISSUE: method pointer
         ((UnityEvent <string>) this.Input.get_onValueChanged()).AddListener(new UnityAction <string>((object)this, __methodptr(OnInputFieldChange)));
     }
     this.UpdateInteractable(CriticalSection.GetActive());
 }
コード例 #5
0
 private void OnInputFieldChange(string value, InputField input)
 {
     for (int startIndex = 0; startIndex < value.Length; ++startIndex)
     {
         if (this.IsEmoji(value[startIndex]))
         {
             input.set_text(value.Remove(startIndex));
             break;
         }
     }
     this.UpdateInteractable(CriticalSection.GetActive());
 }
コード例 #6
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);
 }
コード例 #7
0
        public override int Update()
        {
            base.Update();
            if (this.m_Destroy && this.isClosed)
            {
                this.SetActiveChild(false);
                return(190);
            }
            int active = (int)CriticalSection.GetActive();

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ReceiveToggle, (UnityEngine.Object)null))
            {
                ((Selectable)this.m_ReceiveToggle).set_interactable(active == 0);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SendToggle, (UnityEngine.Object)null))
            {
                ((Selectable)this.m_SendToggle).set_interactable(active == 0);
            }
            return(-1);
        }
コード例 #8
0
        public static void Leave(CriticalSections mask = CriticalSections.Default)
        {
            CriticalSections updateMask = (CriticalSections)0;

            for (int index = 3; index >= 0; --index)
            {
                if ((mask & (CriticalSections)(1 << index)) != (CriticalSections)0)
                {
                    --CriticalSection.mCounts[index];
                    if (CriticalSection.mCounts[index] == 0)
                    {
                        updateMask |= (CriticalSections)(1 << index);
                    }
                }
            }
            if (updateMask == (CriticalSections)0)
            {
                return;
            }
            UIValidator.UpdateValidators(updateMask, CriticalSection.GetActive());
        }
コード例 #9
0
ファイル: SRPG_Button.cs プロジェクト: zunaalabaya/TAC-BOT
 private bool IsCriticalSectionActive()
 {
     return((this.CSMask & CriticalSection.GetActive()) != (CriticalSections)0);
 }