void OnAdjustBtnClick() { if (isSelf) { ShowEmbattlePanel(OpenSourceType.ArenaDefen); } else { if (!uiabattior.CanDare()) { return; } ShowEmbattlePanel(OpenSourceType.Arena); //UIEmbattle.sourceType = OpenSourceType.Arena; if (null == embattle) { embattle = UIEmbattle.instance; } ClearCallBack(); embattle.OnConfirm += OnConfirmLineup; //Control.HideGUI(GameLibrary.UIAbattiorLis); } }
void Start() { if (null == icon) { return; } uiEmbattle = transform.GetComponentInParent <UIEmbattle>(); EventDelegate.Set(icon.onClick, OnIconClick); }
void ShowEmbattlePanel(OpenSourceType type) { Control.HideGUI(UIPanleID.UIAbattiorList); Control.ShowGUI(UIPanleID.UIEmbattle, EnumOpenUIType.OpenNewCloseOld, false, type); if (null == embattle) { embattle = UIEmbattle.instance; } ClearCallBack(); //embattle.OnConfirm += OnConfirm; }
public UIEmbattle() { instance = this; }