From 41a6e87783d042bf3e0ecebfa772443f2b5ed95d Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 06 六月 2019 17:22:55 +0800
Subject: [PATCH] 7132 【2.0】【开发】打宝界面优化2
---
System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs | 59 +++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
index 1dfdcf5..0610097 100644
--- a/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
+++ b/System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -25,6 +25,8 @@
[SerializeField] protected TextEx m_BossLevel;
[SerializeField] protected RectTransform m_RealmContainer;
[SerializeField] protected Image m_Realm;
+ [SerializeField] protected RectTransform m_UnLockCondition;
+ [SerializeField] protected Image m_UnLockRealm;
[SerializeField] protected TimerBehaviour m_CoolDown;
[SerializeField] protected Transform m_RefreshAtOnce;
[SerializeField] protected Material m_NormalMaterial;
@@ -46,20 +48,23 @@
protected virtual bool isRebornRightNow {
get {
- FindPreciousModel.BossInfo bossInfo = null;
- if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo))
- {
- return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime;
- }
- else
+ if (!findPreciousModel.IsBossUnlock(bossId))
{
return false;
}
+
+ FindPreciousModel.BossInfo bossInfo = null;
+ if (!findPreciousModel.TryGetBossInfo(bossId, out bossInfo))
+ {
+ return false;
+ }
+
+ return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime;
}
}
protected virtual bool isUnLocked {
- get { return true; }
+ get { return findPreciousModel.IsBossUnlock(bossId); }
}
protected FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
@@ -83,27 +88,38 @@
findPreciousModel.bossInfoUpdateEvent -= OnBossInfoUpdate;
}
- protected virtual void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm)
+ protected virtual void DrawBossBaseInfo(string icon, string name, int level, int realm)
{
- m_Portrait.SetSprite(_icon);
+ m_Portrait.SetSprite(icon);
m_Portrait.SetNativeSize();
- m_BossName.text = _name;
- m_BossLevel.text = Language.Get("Z1024", _level);
+ this.m_BossName.text = name;
+ m_BossLevel.text = Language.Get("Z1024", level);
- if (m_Realm != null && m_RealmContainer != null)
+ m_RealmContainer.gameObject.SetActive(isUnLocked);
+ m_UnLockCondition.gameObject.SetActive(!isUnLocked);
+ if (!isUnLocked)
{
- if (_realm > 0 && RealmConfig.Has(_realm))
+ var unLockRealm = findPreciousModel.GetBossUnLockRealm(bossId);
+ var config = RealmConfig.Get(unLockRealm);
+ m_UnLockRealm.SetSprite(config.Img);
+ }
+ else
+ {
+ if (m_Realm != null && m_RealmContainer != null)
{
- m_RealmContainer.gameObject.SetActive(true);
- var realmConfig = RealmConfig.Get(_realm);
- if (realmConfig != null)
+ if (realm > 0 && RealmConfig.Has(realm))
{
- m_Realm.SetSprite(realmConfig.Img);
+ m_RealmContainer.gameObject.SetActive(true);
+ var realmConfig = RealmConfig.Get(realm);
+ if (realmConfig != null)
+ {
+ m_Realm.SetSprite(realmConfig.Img);
+ }
}
- }
- else
- {
- m_RealmContainer.gameObject.SetActive(false);
+ else
+ {
+ m_RealmContainer.gameObject.SetActive(false);
+ }
}
}
}
@@ -171,7 +187,6 @@
}
m_Selected.gameObject.SetActive(selected);
- //m_BackGround.SetSprite(selected ? "DemonJarSelectFrame" : "DemonJarNormalFrame");
var fontPattern = string.Empty;
switch (_state)
--
Gitblit v1.8.0