77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
|
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using Games.Item;
|
|||
|
using GCGame.Table;
|
|||
|
using GCGame;
|
|||
|
using Games.Fellow;
|
|||
|
using Games.GlobeDefine;
|
|||
|
|
|||
|
public class BossUIItem : UIItemSelect
|
|||
|
{
|
|||
|
public Text Name;
|
|||
|
public Text Level;
|
|||
|
public TimeDownText TimeDown;
|
|||
|
public Text Desc;
|
|||
|
public GameObject KilledObj;
|
|||
|
public Image BackImage;
|
|||
|
|
|||
|
BossUI.BossInfo m_BossInfo = null;
|
|||
|
|
|||
|
public override void Show(Hashtable hash)
|
|||
|
{
|
|||
|
m_BossInfo = (BossUI.BossInfo)hash["InitObj"];
|
|||
|
if (m_BossInfo == null)
|
|||
|
return;
|
|||
|
LoadAssetBundle.Instance.SetImageSprite(BackImage, m_BossInfo.bossBack);
|
|||
|
Name.text = m_BossInfo.bossName;
|
|||
|
if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < m_BossInfo.bossLevel)
|
|||
|
{
|
|||
|
Level.text = string.Format("<color=#ff3131ff>Lv.{0}</color>", m_BossInfo.bossLevel);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
Level.text = string.Format("<color=#54ed48ff>Lv.{0}</color>", m_BossInfo.bossLevel);
|
|||
|
}
|
|||
|
Desc.text = m_BossInfo.bossDesc;
|
|||
|
TimeDown.Init("");
|
|||
|
Refresh();
|
|||
|
base.Show();
|
|||
|
}
|
|||
|
|
|||
|
public override void Refresh()
|
|||
|
{
|
|||
|
base.Refresh();
|
|||
|
if (KilledObj != null)
|
|||
|
KilledObj.SetActive(m_BossInfo.isKilled);
|
|||
|
|
|||
|
if (m_BossInfo.bossType == 0)
|
|||
|
return;
|
|||
|
if(m_BossInfo.bossType == 3)
|
|||
|
{
|
|||
|
if(ActivityDataManager.Instance.IsActivityState((int)ActivityDataManager.Activity_Type.ACTIVITY_TYPE_CROSSSERVERBOSS,ActivityDataManager.ActivityState.Playing))
|
|||
|
{
|
|||
|
TimeDown.Init(StrDictionary.GetClientDictionaryString("#{49106}"));
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
TimeDown.Init(StrDictionary.GetClientDictionaryString("#{6728}"));
|
|||
|
}
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
if(m_BossInfo.reliveTime > Time.realtimeSinceStartup)
|
|||
|
{
|
|||
|
TimeDown.Init("", m_BossInfo.reliveTime,0,-1,delegate(Hashtable table)
|
|||
|
{
|
|||
|
TimeDown.Init(StrDictionary.GetClientDictionaryString("#{49106}"));
|
|||
|
},TimeDownText.TimeFormat.english,1);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
TimeDown.Init(StrDictionary.GetClientDictionaryString("#{49106}"));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|