using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
//特权卡
|
public class PrivilegeCardWin : UIBase
|
{
|
//月卡
|
[SerializeField] PrivilegeCardCell monthObj;
|
[SerializeField] PrivilegeCardCell foreverObj;
|
|
|
protected override void OnPreOpen()
|
{
|
InvestModel.Instance.onInvestUpdate += OnInvestUpdate;
|
GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
|
monthObj.Display(1);
|
foreverObj.Display(2);
|
}
|
|
protected override void OnPreClose()
|
{
|
InvestModel.Instance.onInvestUpdate -= OnInvestUpdate;
|
GlobalTimeEvent.Instance.secondEvent += OnSecondEvent;
|
|
}
|
|
|
|
void OnInvestUpdate(int type)
|
{
|
monthObj.Display(1);
|
foreverObj.Display(2);
|
}
|
|
void OnSecondEvent()
|
{
|
monthObj.UpdateTime(1);
|
}
|
}
|