From 6744e146301f4818351bf5eaefc5dfedb031b658 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 09 十月 2018 11:41:57 +0800
Subject: [PATCH] Merge branch 'master' into 3687天赋功能
---
System/Store/Logic/BuyGuardTip.cs | 4 -
System/Store/Logic/BuyWingsTip.cs | 4 -
System/MainInterfacePanel/UpgradeWin.cs | 41 +++++--------
System/Store/Logic/BuyEquipTip.cs | 6 -
System/Store/BuyItemPopModel.cs | 20 +-----
System/Store/Logic/BuyPetMatInfoWin.cs | 5 -
System/MainInterfacePanel/HeadPortraitTip.cs | 8 ++
System/Store/Logic/BuyItemInfoWin.cs | 17 ++---
System/Treasure/TreasureModel.cs | 9 +++
System/Treasure/TreasureLevelUpWin.cs | 19 +++--
System/Store/Logic/BuyBoxInfoWin.cs | 4 -
11 files changed, 62 insertions(+), 75 deletions(-)
diff --git a/System/MainInterfacePanel/HeadPortraitTip.cs b/System/MainInterfacePanel/HeadPortraitTip.cs
index 2928d84..b1356b7 100644
--- a/System/MainInterfacePanel/HeadPortraitTip.cs
+++ b/System/MainInterfacePanel/HeadPortraitTip.cs
@@ -63,6 +63,7 @@
CapacityDelayModel capacityDelayModel { get { return m_CapacityDelayModel ?? (m_CapacityDelayModel = ModelCenter.Instance.GetModel<CapacityDelayModel>()); } }
FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
private int vipExperienceSurplusTime = 0;
+ private int GetLv = 0;//鑾峰彇浜虹墿绛夌骇
public void Init()
{
loadingtime = 0f;
@@ -329,7 +330,7 @@
void Initialize()//鍏充簬鏁版嵁鐨勫垵濮嬪寲
{
-
+ GetLv = PlayerDatas.Instance.baseData.LV;
_LVText.text = PlayerDatas.Instance.baseData.LV.ToString();//绛夌骇鐨勫垵濮嬪寲
_Hp_number.text = PlayerDatas.Instance.baseData.HP.ToString() + "/" + PlayerDatas.Instance.extersion.MaxHP.ToString();//浜虹墿琛�閲忕殑鍒濆鍖�
_hp = (int)PlayerDatas.Instance.baseData.HP;
@@ -368,6 +369,11 @@
break;
case PlayerDataRefresh.LV://绛夌骇鐨勫埛鏂�8
_LVText.text = PlayerDatas.Instance.baseData.LV.ToString();
+ if (PlayerDatas.Instance.baseData.LV > GetLv)
+ {
+ GetLv = PlayerDatas.Instance.baseData.LV;
+ WindowCenter.Instance.Open<UpgradeWin>();
+ }
break;
case PlayerDataRefresh.MaxHP://鏈�澶ц閲忕殑鍒锋柊28
_maxHp = (int)PlayerDatas.Instance.extersion.MaxHP;
diff --git a/System/MainInterfacePanel/UpgradeWin.cs b/System/MainInterfacePanel/UpgradeWin.cs
index ad91ce6..3bca967 100644
--- a/System/MainInterfacePanel/UpgradeWin.cs
+++ b/System/MainInterfacePanel/UpgradeWin.cs
@@ -9,15 +9,14 @@
using UnityEngine;
using UnityEngine.UI;
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
public class UpgradeWin : Window
- {
- [SerializeField] UIAlphaTween m_UIAlphaTween;
- [SerializeField] ScaleTween m_ScaleTween;
- [SerializeField] UIAlphaTween m_UIAlphaTween1;
- [SerializeField] GameObject m_Guang;
+ {
+ [SerializeField] ScaleTween m_ScaleTween;
[SerializeField] Text m_TextLV;
+ [SerializeField] UIEffect m_UIEffect;
#region Built-in
protected override void BindController()
{
@@ -28,31 +27,34 @@
}
protected override void OnPreOpen()
- {
- // m_Guang.SetActive(false);
- m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
- m_UIAlphaTween1.SetEndState();
-
-
+ {
+ m_TextLV.text = PlayerDatas.Instance.baseData.LV.ToString();
}
protected override void OnActived()
{
- m_UIAlphaTween.Play(ShowOverAlpha);
+ m_UIEffect.Play();
+ m_UIEffect.OnComplete = () => { CloseImmediately(); };
m_ScaleTween.Play();
}
protected override void OnAfterOpen()
{
-
WindowCenter.Instance.windowBeforeCloseEvent += windowBeforeClose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//鏁版嵁鐨勫埛鏂�(h0418)
}
protected override void OnPreClose()
{
+ if (m_UIEffect.IsPlaying)
+ {
+ m_UIEffect.Stop();
+ }
WindowCenter.Instance.windowBeforeCloseEvent -= windowBeforeClose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//鏁版嵁鐨勫埛鏂�(h0418)
}
-
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
private void windowBeforeClose(Window _window)
{
if (_window is MainInterfaceWin)
@@ -69,15 +71,6 @@
}
}
- protected override void OnAfterClose()
- {
- }
- #endregion
- private void ShowOverAlpha()
- {
- m_UIAlphaTween.Play(true);
- m_UIAlphaTween1.Play(true);
- }
}
}
diff --git a/System/Store/BuyItemPopModel.cs b/System/Store/BuyItemPopModel.cs
index bbf3951..b467bb9 100644
--- a/System/Store/BuyItemPopModel.cs
+++ b/System/Store/BuyItemPopModel.cs
@@ -106,23 +106,9 @@
int count = 0;
IsReachUpper = false;
if(canBuyCnt == 0)
- {
- if(isVipBuy)
- {
- IsReachUpper = true;
- }
- else
- {
- if (buyCnt <= 9999)
- {
- count = buyCnt;
- }
- else
- {
- count = 9999;
- IsReachUpper = true;
- }
- }
+ {
+ IsReachUpper = true;
+ count = 0;
}
else
{
diff --git a/System/Store/Logic/BuyBoxInfoWin.cs b/System/Store/Logic/BuyBoxInfoWin.cs
index aab6669..3ba8b58 100644
--- a/System/Store/Logic/BuyBoxInfoWin.cs
+++ b/System/Store/Logic/BuyBoxInfoWin.cs
@@ -336,7 +336,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -361,7 +361,6 @@
if(curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
}
else
{
@@ -373,7 +372,6 @@
{
vipInfoText.gameObject.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyEquipTip.cs b/System/Store/Logic/BuyEquipTip.cs
index 2539170..38be9af 100644
--- a/System/Store/Logic/BuyEquipTip.cs
+++ b/System/Store/Logic/BuyEquipTip.cs
@@ -690,8 +690,8 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
- if(itemAttrData.itemConfig.PackCount > 1)
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ if (itemAttrData.itemConfig.PackCount > 1)
{
_numberGo.gameObject.SetActive(true);
}
@@ -715,7 +715,6 @@
if (curVipIndex != -1)
{
btnGroup.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -727,7 +726,6 @@
{
vipInfoText.gameObject.SetActive(false);
btnGroup.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyGuardTip.cs b/System/Store/Logic/BuyGuardTip.cs
index 491c738..437884b 100644
--- a/System/Store/Logic/BuyGuardTip.cs
+++ b/System/Store/Logic/BuyGuardTip.cs
@@ -398,7 +398,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemAttrData.itemConfig.PackCount > 1)
{
_numberGo.gameObject.SetActive(true);
@@ -423,7 +423,6 @@
if (curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -435,7 +434,6 @@
{
vipInfoObj.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Store/Logic/BuyItemInfoWin.cs b/System/Store/Logic/BuyItemInfoWin.cs
index ac61829..cca5a60 100644
--- a/System/Store/Logic/BuyItemInfoWin.cs
+++ b/System/Store/Logic/BuyItemInfoWin.cs
@@ -326,7 +326,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -352,7 +352,7 @@
if(curVipIndex != -1)
{
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
+
}
else
{
@@ -363,7 +363,6 @@
else
{
vipInfoText.gameObject.SetActive(false);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
if(buyItem.storeConfig.LimitValue != 0)
@@ -475,7 +474,7 @@
private void OnClickNum()
{
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value),GetRemainBuyCnt(), isVipBuy,out isReachUpper);
+ buyCnt = buyItem.GetCurBuyCnt(int.Parse(numKeyboard.Value), GetRemainBuyCnt(), isVipBuy, out isReachUpper);
RefreshBuyPrice(buyCnt);
numKeyboard.Value = buyCnt.ToString();
if (isReachUpper)
@@ -495,12 +494,12 @@
private void OnClickPlusBuyNum()
{
- buyCnt += 1;
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt,GetRemainBuyCnt(), isVipBuy, out isReachUpper);
+ buyCnt += 1;
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
- if (isReachUpper)
+ if (isReachUpper || buyCnt == 0)
{
MessageWin.Inst.ShowFixedTip(Language.Get("StoreWin109"));
}
@@ -508,9 +507,9 @@
private void OnClickReduceBuyNum()
{
- buyCnt -= 1;
bool isReachUpper = false;
- buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy,out isReachUpper);
+ buyCnt -= 1;
+ buyCnt = buyItem.GetCurBuyCnt(buyCnt, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
buyCountText.text = buyCnt.ToString();
RefreshBuyPrice(buyCnt);
}
diff --git a/System/Store/Logic/BuyPetMatInfoWin.cs b/System/Store/Logic/BuyPetMatInfoWin.cs
index fb55e4e..0204427 100644
--- a/System/Store/Logic/BuyPetMatInfoWin.cs
+++ b/System/Store/Logic/BuyPetMatInfoWin.cs
@@ -307,7 +307,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig,out canBuyCnt,out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemTipsModel.curAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -333,7 +333,7 @@
if(curVipIndex != -1)
{
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt,isVipBuy,out isReachUpper);
+
}
else
{
@@ -344,7 +344,6 @@
else
{
vipInfoText.gameObject.SetActive(false);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
if(buyItem.storeConfig.LimitValue != 0)
diff --git a/System/Store/Logic/BuyWingsTip.cs b/System/Store/Logic/BuyWingsTip.cs
index 98942d2..d8bbc29 100644
--- a/System/Store/Logic/BuyWingsTip.cs
+++ b/System/Store/Logic/BuyWingsTip.cs
@@ -361,7 +361,7 @@
int addBuyCnt = 0;
bool isLimitCnt = buyItem.CheckIsLimitBuyCnt(buyItem.storeConfig, out canBuyCnt, out addBuyCnt);
bool isReachUpper = false;
- buyCnt = 0;
+ buyCnt = buyItem.GetCurBuyCnt(1, GetRemainBuyCnt(), isVipBuy, out isReachUpper);
if (itemAttrData.itemConfig.PackCount > 1)
{
numberGo.gameObject.SetActive(true);
@@ -386,7 +386,6 @@
if (curVipIndex != -1)
{
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
else
{
@@ -398,7 +397,6 @@
{
vipInfoText.gameObject.SetActive(false);
buyBtn.gameObject.SetActive(true);
- buyCnt = buyItem.GetCurBuyCnt(1, canBuyCnt, isVipBuy, out isReachUpper);
}
buyCountText.text = buyCnt.ToString();
diff --git a/System/Treasure/TreasureLevelUpWin.cs b/System/Treasure/TreasureLevelUpWin.cs
index 5b70a10..b53d92d 100644
--- a/System/Treasure/TreasureLevelUpWin.cs
+++ b/System/Treasure/TreasureLevelUpWin.cs
@@ -169,6 +169,7 @@
m_Slider.slider.onValueChanged.AddListener(OnSliderValueUpdate);
NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ model.skillLevelUpRedpointUpdate += SkillLevelUpRedpointUpdate;
m_DragSelect.onDragComplete += onDragComplete;
CameraManager.uiCamera.enabled = true;
@@ -215,6 +216,7 @@
model.treasureStateChangeEvent -= TreasureStateChangeEvent;
FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
m_DragSelect.onDragComplete -= onDragComplete;
+ model.skillLevelUpRedpointUpdate -= SkillLevelUpRedpointUpdate;
m_Slider.slider.onValueChanged.RemoveAllListeners();
m_TreasurePotential.Dispose();
m_AchievementScroll.Dispose();
@@ -1203,14 +1205,15 @@
UpdateLevelUpSfx(false);
}
}
- if (_id == TreasureModel.CATEGORY_REDPOINTIDS[(int)TreasureCategory.Human - 1])
- {
- var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
- m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
- && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
- m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
- && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
- }
+ }
+
+ private void SkillLevelUpRedpointUpdate()
+ {
+ var skillLevelUpRedpointTreasure = model.GetSkillLevelUpRedpointTreasure();
+ m_LeftRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure > skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
+ m_RightRedpoint.gameObject.SetActive(skillLevelUpRedpointTreasure != 0
+ && model.selectedTreasure < skillLevelUpRedpointTreasure && model.currentCategory == TreasureCategory.Human);
}
protected override void LateUpdate()
diff --git a/System/Treasure/TreasureModel.cs b/System/Treasure/TreasureModel.cs
index ba7d694..f4873b4 100644
--- a/System/Treasure/TreasureModel.cs
+++ b/System/Treasure/TreasureModel.cs
@@ -45,6 +45,7 @@
public event Action<int> treasureLevelProgressUpdateEvent;
public event Action<int> treasureStageUpEvent;
public event Action<int> humanTreasureStateChangeEvent;
+ public event Action skillLevelUpRedpointUpdate;
bool m_WaitOpenDetailsWin = false;
public bool waitOpenDetailsWin {
@@ -842,6 +843,10 @@
{
treasure.skillLevelUpRedpoint.state = RedPointState.Simple;
treasure.autoSelectPotential = k;
+ if (skillLevelUpRedpointUpdate != null)
+ {
+ skillLevelUpRedpointUpdate();
+ }
return;
}
}
@@ -897,6 +902,10 @@
treasures[minCostTreasure].autoSelectPotential = minCostPotentialIndex;
}
}
+ if (skillLevelUpRedpointUpdate != null)
+ {
+ skillLevelUpRedpointUpdate();
+ }
}
public int GetSkillLevelUpRedpointTreasure()
--
Gitblit v1.8.0