using System;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
|
namespace vnxbqy.UI
|
{
|
|
public class CrossServerWin : OneLevelWin
|
{
|
private FunctionButton gszcbtn;
|
protected override void AddListeners()
|
{
|
base.AddListeners();
|
SetFunctionListener(0, ClickArenaFunc);
|
SetFunctionListener(1, ClickBossFunc);
|
SetFunctionListener(2, ClickMHBoss);
|
SetFunctionListener(3, ClickBattleField);
|
SetFunctionListener(4, ClickFamilyBattle);
|
}
|
|
protected override void OnAfterOpen()
|
{
|
base.OnAfterOpen();
|
gszcbtn = m_Group.GetFunctionBtn(3);
|
if (TimeUtility.OpenDay < GeneralDefine.crossServerBattleFieldOpenDay)
|
{
|
gszcbtn.state = TitleBtnState.Locked;
|
gszcbtn.OnPointClickLockFunc -= Gszcbtn_OnPointClickLockFunc;
|
gszcbtn.OnPointClickLockFunc += Gszcbtn_OnPointClickLockFunc;
|
}
|
|
}
|
|
private void Gszcbtn_OnPointClickLockFunc(string obj)
|
{
|
var mapName = UIHelper.AppendColor(TextColType.Green, MapConfig.Get(GeneralDefine.CrossBattleFieldMapID).Name);
|
SysNotifyMgr.Instance.ShowTip("ImpactRankActivityUnOpen", mapName, GeneralDefine.crossServerBattleFieldOpenDay + 1);
|
}
|
|
private void ClickBossFunc()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<CrossServerBossWin>();
|
functionOrder = 1;
|
}
|
|
private void ClickArenaFunc()
|
{
|
if (TimeUtility.OpenDay < GeneralDefine.crossServerOneVsOneOpenDay)
|
{
|
SysNotifyMgr.Instance.ShowTip("CrossMatching15", GeneralDefine.crossServerOneVsOneOpenDay);
|
ClickBossFunc();
|
return;
|
}
|
|
CloseSubWindows();
|
WindowCenter.Instance.Open<CrossServerOneVsOneWin>();
|
functionOrder = 0;
|
}
|
|
private void ClickMHBoss()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open("CrossServerMHBossWin");
|
functionOrder = 2;
|
}
|
|
private void ClickBattleField()
|
{
|
if (TimeUtility.OpenDay < GeneralDefine.crossServerBattleFieldOpenDay)
|
{
|
var mapName = UIHelper.AppendColor(TextColType.Green, MapConfig.Get(GeneralDefine.CrossBattleFieldMapID).Name);
|
SysNotifyMgr.Instance.ShowTip("ImpactRankActivityUnOpen", mapName, GeneralDefine.crossServerBattleFieldOpenDay + 1);
|
return;
|
}
|
CloseSubWindows();
|
WindowCenter.Instance.Open("CrossServerGodBattleFieldWin");
|
functionOrder = 3;
|
}
|
|
private void ClickTimeBoss()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open("CrossServerTimeBossWin");
|
functionOrder = 5;
|
}
|
|
|
private void ClickFamilyBattle()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open("CrossServerFamilyBattleWin");
|
functionOrder = 4;
|
}
|
}
|
}
|