public void RollEnd() { this.mRollAgain.gameObject.SetActive(true); this.mOK.gameObject.SetActive(true); GUIRollingSceneV2.ERollType eRollType = this.rollType; if (eRollType != GUIRollingSceneV2.ERollType.ERollType_Low) { if (eRollType == GUIRollingSceneV2.ERollType.ERollType_high) { GUIRollingSceneV2.ERollTimes eRollTimes = this.rollTimes; if (eRollTimes != GUIRollingSceneV2.ERollTimes.ERollTimes_One) { if (eRollTimes == GUIRollingSceneV2.ERollTimes.ERollTimes_Ten) { this.mRollAgain.transform.localPosition = new Vector3(this.mRollAgain.transform.localPosition.x, (float)this.btnHighPos, this.mRollAgain.transform.localPosition.z); this.mOK.transform.localPosition = new Vector3(this.mOK.transform.localPosition.x, (float)this.btnHighPos, this.mOK.transform.localPosition.z); if (this.highItemCount >= GameConst.GetInt32(40)) { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 10 }); this.mAgainIcon.spriteName = this.highItemIconName; this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(40) }); this.mAgainValue.color = Color.white; } else if (GUIRollSceneV2.IsHighRollFree()) { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mAgainFree.enabled = true; this.mAgainIcon.enabled = false; this.mAgainValue.enabled = false; this.mAgainValue.color = Color.white; this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_One; } else if (this.highItemCount > 0) { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainValue.color = Color.white; this.mAgainIcon.spriteName = this.highItemIconName; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(39) }); this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_One; } else { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 10 }); this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainIcon.spriteName = this.highDiamondIconName; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { this.tenCost }); if (Globals.Instance.Player.Data.Diamond < this.tenCost) { this.mAgainValue.color = this.redCol; } else if (this.mActivityValueData == null) { this.mAgainValue.color = Color.white; } else { this.mAgainValue.color = Color.yellow; } } GameUIManager.mInstance.TryCommend(ECommentType.EComment_Summon10, 0f); } } else { this.mNextDesc.transform.parent.gameObject.SetActive(true); this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mTitleName.transform.parent.gameObject.SetActive(true); this.mTitleName.text = Tools.GetPetName(this.mCurPetData.Info); this.mTitleName.applyGradient = false; this.mTitleName.color = Tools.GetItemQualityColor(this.mCurPetData.Info.Quality); this.mTitleElement.spriteName = Tools.GetPropertyIconWithBorder((EElementType)this.mCurPetData.Info.ElementType); this.mTitleType.spriteName = Tools.GetPetTypeIcon(this.mCurPetData.Info.Type); this.mTitleElement.enabled = true; this.mTitleType.enabled = true; this.mRollAgain.transform.localPosition = new Vector3(this.mRollAgain.transform.localPosition.x, (float)this.btnLowPos, this.mRollAgain.transform.localPosition.z); this.mOK.transform.localPosition = new Vector3(this.mOK.transform.localPosition.x, (float)this.btnLowPos, this.mOK.transform.localPosition.z); if (GUIRollSceneV2.IsHighRollFree()) { this.mAgainFree.enabled = true; this.mAgainIcon.enabled = false; this.mAgainValue.enabled = false; this.mAgainValue.color = Color.white; } else if (this.highItemCount > 0) { this.mAgainIcon.spriteName = this.highItemIconName; this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainValue.color = Color.white; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(39) }); } else { this.mAgainIcon.spriteName = this.highDiamondIconName; this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { this.oneCost }); if (Globals.Instance.Player.Data.Diamond < this.oneCost) { this.mAgainValue.color = this.redCol; } else if (this.mActivityValueData == null) { this.mAgainValue.color = Color.white; } else { this.mAgainValue.color = Color.yellow; } } } } } else { GUIRollingSceneV2.ERollTimes eRollTimes = this.rollTimes; if (eRollTimes != GUIRollingSceneV2.ERollTimes.ERollTimes_One) { if (eRollTimes == GUIRollingSceneV2.ERollTimes.ERollTimes_Ten) { this.mRollAgain.transform.localPosition = new Vector3(this.mRollAgain.transform.localPosition.x, (float)this.btnHighPos, this.mRollAgain.transform.localPosition.z); this.mOK.transform.localPosition = new Vector3(this.mOK.transform.localPosition.x, (float)this.btnHighPos, this.mOK.transform.localPosition.z); if (this.lowItemCount >= GameConst.GetInt32(40)) { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 10 }); this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(38) }); this.mRollAgain.transform.localPosition = new Vector3(this.mRollAgain.transform.localPosition.x, (float)this.btnHighPos, this.mRollAgain.transform.localPosition.z); this.mOK.transform.localPosition = new Vector3(this.mOK.transform.localPosition.x, (float)this.btnHighPos, this.mOK.transform.localPosition.z); } else if (GUIRollSceneV2.IsLowRollFree()) { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mAgainValue.enabled = false; this.mAgainFree.enabled = true; this.mAgainIcon.enabled = false; this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_One; } else { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mAgainValue.enabled = true; this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(37) }); this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_One; if (this.lowItemCount < GameConst.GetInt32(37)) { this.mAgainValue.color = this.redCol; } else { this.mAgainValue.color = Color.white; } } } } else { this.mAgainTxt.text = Singleton<StringManager>.Instance.GetString("rollAgain", new object[] { 1 }); this.mTitleName.transform.parent.gameObject.SetActive(true); this.mTitleName.text = Tools.GetPetName(this.mCurPetData.Info); this.mTitleName.applyGradient = false; this.mTitleName.color = Tools.GetItemQualityColor(this.mCurPetData.Info.Quality); this.mTitleElement.spriteName = Tools.GetPropertyIconWithBorder((EElementType)this.mCurPetData.Info.ElementType); this.mTitleType.spriteName = Tools.GetPetTypeIcon(this.mCurPetData.Info.Type); this.mTitleElement.enabled = true; this.mTitleType.enabled = true; this.mRollAgain.transform.localPosition = new Vector3(this.mRollAgain.transform.localPosition.x, (float)this.btnLowPos, this.mRollAgain.transform.localPosition.z); this.mOK.transform.localPosition = new Vector3(this.mOK.transform.localPosition.x, (float)this.btnLowPos, this.mOK.transform.localPosition.z); if (GUIRollSceneV2.IsLowRollFree()) { this.mAgainFree.enabled = true; this.mAgainIcon.enabled = false; this.mAgainValue.enabled = false; } else { this.mAgainFree.enabled = false; this.mAgainIcon.enabled = true; this.mAgainValue.enabled = true; this.mAgainValue.text = Singleton<StringManager>.Instance.GetString("rollCost", new object[] { GameConst.GetInt32(37) }); if (this.lowItemCount < GameConst.GetInt32(37)) { this.mAgainValue.color = this.redCol; } else { this.mAgainValue.color = Color.white; } } } } }
private void OnRollTenClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_Ten; GUIRollingSceneV2.ERollType eRollType = this.rollType; if (eRollType != GUIRollingSceneV2.ERollType.ERollType_Low) { if (eRollType == GUIRollingSceneV2.ERollType.ERollType_high) { if (this.highItemCount >= GameConst.GetInt32(40) || !Tools.MoneyNotEnough(ECurrencyType.ECurrencyT_Diamond, this.tenCost, 0)) { this.SendRollRequestToServer(); } } } else if (this.lowItemCount >= GameConst.GetInt32(38)) { this.SendRollRequestToServer(); } else { GameUIManager.mInstance.ShowMessageTipByKey("rollLowItemNotEnough", 0f, 0f); } }
public void OnRollOneClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); this.rollTimes = GUIRollingSceneV2.ERollTimes.ERollTimes_One; GUIRollingSceneV2.ERollType eRollType = this.rollType; if (eRollType != GUIRollingSceneV2.ERollType.ERollType_Low) { if (eRollType == GUIRollingSceneV2.ERollType.ERollType_high) { if (this.highItemCount > 0 || GUIRollSceneV2.IsHighRollFree() || !Tools.MoneyNotEnough(ECurrencyType.ECurrencyT_Diamond, this.oneCost, 0)) { this.SendRollRequestToServer(); } } } else if (this.lowItemCount > 0 || GUIRollSceneV2.IsLowRollFree()) { this.SendRollRequestToServer(); } else { GameUIManager.mInstance.ShowMessageTipByKey("rollLowItemNotEnough", 0f, 0f); } }