using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace Snxxz.UI
|
{
|
public class PetWin : OneLevelWin
|
{
|
|
PetModel petmodel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
|
MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
|
|
protected override void AddListeners()
|
{
|
base.AddListeners();
|
SetFunctionListener(0, OpenMountWin);
|
SetFunctionListener(1, OpenPetWin);
|
}
|
|
protected override void OnActived()
|
{
|
if (!WindowJumpMgr.Instance.IsJumpState && functionOrder < 2)//是否进行跳转
|
{
|
if (mountModel.IsHorsePanelState() < petmodel.IsPetPanelRedPointState())
|
{
|
functionOrder = 1;
|
}
|
}
|
|
base.OnActived();
|
}
|
|
private void OpenPetWin()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<PetAttributeWin>(true);
|
functionOrder = 0;
|
}
|
|
private void OpenMountWin()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<MountWin>(true);
|
functionOrder = 1;
|
}
|
|
}
|
}
|