88 lines
2.5 KiB
C#
88 lines
2.5 KiB
C#
|
using Games.LogicObj;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using GCGame;
|
|||
|
using Module.Log;
|
|||
|
using Games.GlobeDefine;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class GuildWarPre : MonoBehaviour
|
|||
|
{
|
|||
|
public static int GuildWarPreCopyID = 6044;
|
|||
|
|
|||
|
public TimeDownText TimeDownPre;
|
|||
|
|
|||
|
public TimeDownText TimeDown;
|
|||
|
public Text GuideTip;
|
|||
|
public void Click_StartPreView()
|
|||
|
{
|
|||
|
Utils.EnterCopy(GuildWarPreCopyID);
|
|||
|
Click_Close();
|
|||
|
}
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
if(TimeDown!=null)
|
|||
|
{
|
|||
|
TimeDown.Init("", Time.realtimeSinceStartup + 20, 20, 35116, delegate (Hashtable table)
|
|||
|
{
|
|||
|
Click_StartPreView1();
|
|||
|
},TimeDownText.TimeFormat.number,0);
|
|||
|
}
|
|||
|
|
|||
|
if (TimeDownPre != null)
|
|||
|
{
|
|||
|
TimeDownPre.Init("", Time.realtimeSinceStartup + 5, 5, 35116, delegate (Hashtable table)
|
|||
|
{
|
|||
|
Click_StartPreView();
|
|||
|
}, TimeDownText.TimeFormat.number, 0);
|
|||
|
}
|
|||
|
if (GuideTip != null)
|
|||
|
GuideTip.text = StrDictionary.GetClientDictionaryString("#{29034}");
|
|||
|
}
|
|||
|
|
|||
|
public void Click_StartPreView1()
|
|||
|
{
|
|||
|
ReqFBUnionTestStart cmd = new ReqFBUnionTestStart();
|
|||
|
cmd._Flag = 1;
|
|||
|
cmd.SendMsg();
|
|||
|
|
|||
|
|
|||
|
GCGame.Table.Tab_Fuben fuben = GCGame.Table.TableManager.GetFubenByID(GameManager.gameManager.PlayerDataPool.EnterSceneCache.EnterCopySceneID, 0);
|
|||
|
if (fuben.ForbidTime > 0)
|
|||
|
{
|
|||
|
SceneData.ForbidOverTime = fuben.ForbidTime + UnityEngine.Time.realtimeSinceStartup;
|
|||
|
if (fuben.ForbidTime > 0)
|
|||
|
{
|
|||
|
UIManager.ShowUI(UIInfo.MaskAndCountTimePanel, delegate (bool bSucess, object param)
|
|||
|
{
|
|||
|
if (bSucess)
|
|||
|
{
|
|||
|
MaskAndCountTImePanelCtr.Instance.SetTime(fuben.ForbidTime, fuben.ExistTime, fuben.ForbidType,delegate() {
|
|||
|
|
|||
|
if (Singleton<ObjManager>.Instance.MainPlayer != null)
|
|||
|
Singleton<ObjManager>.Instance.MainPlayer.RefreshPlayerAutoCombat();
|
|||
|
|
|||
|
});
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
Click_Close1();
|
|||
|
}
|
|||
|
|
|||
|
public void Click_Close()
|
|||
|
{
|
|||
|
UIManager.CloseUI(UIInfo.GuildWarPre);
|
|||
|
}
|
|||
|
|
|||
|
public void Click_Close1()
|
|||
|
{
|
|||
|
UIManager.CloseUI(UIInfo.GuildWarPreStart);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|