Esempio n. 1
0
 public static void Show(GUIRollingSceneV2.ERollType type)
 {
     if (GUIPetViewPopUp.mInstance == null)
     {
         GUIPetViewPopUp.CreateInstance();
     }
     GUIPetViewPopUp.mInstance.Init(type);
 }
Esempio n. 2
0
 private void Step_05()
 {
     if (!(Globals.Instance.TutorialMgr.CurrentScene is GetPetLayer))
     {
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIMainMenuScene)
         {
             this.Step_01();
         }
         return;
     }
     if (this.rollingSceneV2 == null)
     {
         this.rollingSceneV2 = GameUIManager.mInstance.GetSession<GUIRollingSceneV2>();
     }
     if (this.rollingSceneV2 == null)
     {
         return;
     }
     base.InitGuideMask(new TutorialInitParams
     {
         MaskParent = this.rollingSceneV2.gameObject,
         TargetName = "Window/OK",
         TargetParent = this.rollingSceneV2.gameObject,
         HandDirection = TutorialEntity.ETutorialHandDirection.ETHD_Right,
         Tips = Singleton<StringManager>.Instance.GetString("tutorial13")
     });
     UIEventListener expr_D7 = UIEventListener.Get(this.area.gameObject);
     expr_D7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_D7.onClick, new UIEventListener.VoidDelegate(this.OnStep_05MaskAreaClick));
     TutorialEntity.SetNextTutorialStep(6, TutorialManager.ETutorialNum.Tutorial_Null, false, false, false);
     base.PlaySound("tutorial_007");
 }
Esempio n. 3
0
 private void Step_04()
 {
     if (Globals.Instance.TutorialMgr.CurrentScene is GUIRollingSceneV2)
     {
         this.rollingSceneV2 = TutorialEntity.ConvertObject2UnityOrPrefab<GUIRollingSceneV2>();
     }
     if (this.rollingSceneV2 == null)
     {
         return;
     }
     base.InitGuideMask(new TutorialInitParams
     {
         MaskParent = this.rollingSceneV2.gameObject,
         TargetName = "Window/RollOne",
         TargetParent = this.rollingSceneV2.gameObject,
         HandDirection = TutorialEntity.ETutorialHandDirection.ETHD_Left,
         Tips = Singleton<StringManager>.Instance.GetString("tutorial2")
     });
     UIEventListener expr_9C = UIEventListener.Get(this.area.gameObject);
     expr_9C.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_9C.onClick, new UIEventListener.VoidDelegate(this.OnStep_04MaskAreaClick));
     TutorialEntity.SetNextTutorialStep(5, TutorialManager.ETutorialNum.Tutorial_Null, false, false, false);
     base.PlaySound("tutorial_006");
 }
Esempio n. 4
0
 public void Init(GUIRollingSceneV2.ERollType type)
 {
     this.mType = type;
     GameUITools.PlayOpenWindowAnim(this.mWindow.transform, null, true);
 }
Esempio n. 5
0
 public void InitState(GUIRollingSceneV2.ERollType type)
 {
     this.rollType = type;
     this.mTitleName.transform.parent.gameObject.SetActive(true);
     this.mNextDesc.transform.parent.gameObject.SetActive(true);
     this.mCurrencyValue.transform.parent.gameObject.SetActive(true);
     this.mTenBG.gameObject.SetActive(false);
     this.mTitleElement.enabled = false;
     this.mTitleType.enabled = false;
     this.RefreshCurrency();
     GUIRollingSceneV2.ERollType eRollType = this.rollType;
     if (eRollType != GUIRollingSceneV2.ERollType.ERollType_Low)
     {
         if (eRollType == GUIRollingSceneV2.ERollType.ERollType_high)
         {
             this.mTitleName.text = Singleton<StringManager>.Instance.GetString("rollHighLabel");
             this.mTitleDesc0.enabled = false;
             this.mTitleDesc1.enabled = true;
             this.mNextDesc.transform.parent.gameObject.SetActive(true);
             this.RefreshNextDesc();
             this.highItemCount = Globals.Instance.Player.ItemSystem.GetHighRollItemCount();
             if (GUIRollSceneV2.IsHighRollFree())
             {
                 this.mRollOne.SetActive(true);
                 this.mRollTen.SetActive(false);
                 this.mRollAgain.SetActive(false);
                 this.mOK.SetActive(false);
                 this.mRollOne.transform.localPosition = new Vector3((float)this.centerPos, this.mRollOne.transform.localPosition.y, 0f);
                 this.mOneCostFree.enabled = true;
                 this.mOneCostIcon.enabled = false;
                 this.mOneCostValue.enabled = false;
             }
             else if (this.highItemCount >= GameConst.GetInt32(40))
             {
                 this.mOneCostIcon.spriteName = this.highItemIconName;
                 this.mTenCostIcon.spriteName = this.highItemIconName;
                 this.mAgainIcon.spriteName = this.highItemIconName;
                 this.mRollOne.SetActive(true);
                 this.mRollTen.SetActive(true);
                 this.mRollAgain.SetActive(false);
                 this.mOK.SetActive(false);
                 this.mRollOne.transform.localPosition = new Vector3((float)this.leftPos, this.mRollOne.transform.localPosition.y, 0f);
                 this.mOneCostFree.enabled = false;
                 this.mOneCostIcon.enabled = true;
                 this.mOneCostValue.enabled = true;
                 this.mOneCostIcon.spriteName = this.highItemIconName;
                 this.mOneCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
                 {
                     GameConst.GetInt32(39)
                 });
                 this.mTenCostIcon.spriteName = this.highItemIconName;
                 this.mTenCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
                 {
                     GameConst.GetInt32(40)
                 });
             }
             else if (this.highItemCount == 0)
             {
                 this.mOneCostIcon.spriteName = this.highDiamondIconName;
                 this.mTenCostIcon.spriteName = this.highDiamondIconName;
                 this.mAgainIcon.spriteName = this.highDiamondIconName;
                 this.mRollOne.SetActive(true);
                 this.mRollTen.SetActive(true);
                 this.mRollAgain.SetActive(false);
                 this.mOK.SetActive(false);
                 this.mRollOne.transform.localPosition = new Vector3((float)this.leftPos, this.mRollOne.transform.localPosition.y, 0f);
                 this.mOneCostFree.enabled = false;
                 this.mOneCostIcon.enabled = true;
                 this.mOneCostValue.enabled = true;
                 this.mOneCostIcon.spriteName = this.highDiamondIconName;
                 this.mTenCostIcon.spriteName = this.highDiamondIconName;
                 this.mOneCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
                 {
                     this.oneCost
                 });
                 this.mTenCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
                 {
                     this.tenCost
                 });
                 if (Globals.Instance.Player.Data.Diamond < this.oneCost)
                 {
                     this.mOneCostValue.color = this.redCol;
                 }
                 else if (this.mActivityValueData == null)
                 {
                     this.mOneCostValue.color = Color.white;
                 }
                 else
                 {
                     this.mOneCostValue.color = Color.yellow;
                 }
                 if (Globals.Instance.Player.Data.Diamond < this.tenCost)
                 {
                     this.mTenCostValue.color = this.redCol;
                 }
                 else if (this.mActivityValueData == null)
                 {
                     this.mTenCostValue.color = Color.white;
                 }
                 else
                 {
                     this.mTenCostValue.color = Color.yellow;
                 }
             }
             else
             {
                 this.mOneCostIcon.spriteName = this.highItemIconName;
                 this.mRollOne.SetActive(true);
                 this.mRollTen.SetActive(false);
                 this.mRollAgain.SetActive(false);
                 this.mOK.SetActive(false);
                 this.mRollOne.transform.localPosition = new Vector3((float)this.centerPos, this.mRollOne.transform.localPosition.y, 0f);
                 this.mOneCostFree.enabled = false;
                 this.mOneCostIcon.enabled = true;
                 this.mOneCostValue.enabled = true;
                 this.mOneCostIcon.spriteName = this.highItemIconName;
                 this.mOneCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
                 {
                     GameConst.GetInt32(39)
                 });
             }
         }
     }
     else
     {
         this.mOneCostIcon.spriteName = this.lowItemIconName;
         this.mTenCostIcon.spriteName = this.lowItemIconName;
         this.mAgainIcon.spriteName = this.lowItemIconName;
         this.mTitleName.text = Singleton<StringManager>.Instance.GetString("rollLowLabel");
         this.mTitleDesc0.enabled = true;
         this.mTitleDesc1.enabled = false;
         this.mNextDesc.transform.parent.gameObject.SetActive(false);
         this.mOneCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
         {
             GameConst.GetInt32(37)
         });
         this.mTenCostValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[]
         {
             GameConst.GetInt32(38)
         });
         this.lowItemCount = Globals.Instance.Player.ItemSystem.GetLowRollItemCount();
         if (GUIRollSceneV2.IsLowRollFree())
         {
             this.mRollOne.SetActive(true);
             this.mRollTen.SetActive(false);
             this.mRollAgain.SetActive(false);
             this.mOK.SetActive(false);
             this.mRollOne.transform.localPosition = new Vector3((float)this.centerPos, this.mRollOne.transform.localPosition.y, 0f);
             this.mOneCostFree.enabled = true;
             this.mOneCostIcon.enabled = false;
             this.mOneCostValue.enabled = false;
         }
         else if (this.lowItemCount >= GameConst.GetInt32(38))
         {
             this.mRollOne.SetActive(true);
             this.mRollTen.SetActive(true);
             this.mRollAgain.SetActive(false);
             this.mOK.SetActive(false);
             this.mRollOne.transform.localPosition = new Vector3((float)this.leftPos, this.mRollOne.transform.localPosition.y, 0f);
             this.mOneCostFree.enabled = false;
             this.mOneCostIcon.enabled = true;
             this.mOneCostValue.enabled = true;
         }
         else if (this.lowItemCount == 0)
         {
             this.mRollOne.SetActive(true);
             this.mRollTen.SetActive(true);
             this.mRollAgain.SetActive(false);
             this.mOK.SetActive(false);
             this.mRollOne.transform.localPosition = new Vector3((float)this.leftPos, this.mRollOne.transform.localPosition.y, 0f);
             this.mOneCostFree.enabled = false;
             this.mOneCostIcon.enabled = true;
             this.mOneCostValue.enabled = true;
             this.mOneCostValue.color = this.redCol;
             this.mTenCostValue.color = this.redCol;
             this.mRollTenBtn.isEnabled = false;
             UIButton[] components = this.mRollTen.GetComponents<UIButton>();
             for (int i = 0; i < components.Length; i++)
             {
                 components[i].SetState(UIButtonColor.State.Disabled, true);
             }
         }
         else
         {
             this.mRollOne.SetActive(true);
             this.mRollTen.SetActive(false);
             this.mRollAgain.SetActive(false);
             this.mOK.SetActive(false);
             this.mRollOne.transform.localPosition = new Vector3((float)this.centerPos, this.mRollOne.transform.localPosition.y, 0f);
             this.mOneCostFree.enabled = false;
             this.mOneCostIcon.enabled = true;
             this.mOneCostValue.enabled = true;
         }
     }
     Globals.Instance.TutorialMgr.InitializationCompleted(this, null);
 }
Esempio n. 6
0
 public static void Change2This(GUIRollingSceneV2.ERollType type)
 {
     GameUIManager.mInstance.ChangeSession<GUIRollingSceneV2>(delegate(GUIRollingSceneV2 sen)
     {
         sen.InitState(type);
     }, false, false);
 }
Esempio n. 7
0
 public virtual void InitPopUp(GUIRollingSceneV2.ERollType type)
 {
 }