| | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | |
|
| | | using UnityEngine.UI;
|
| | | //关于Buff面板的设置
|
| | | namespace Snxxz.UI
|
| | |
| | | private ScrollRect _ScrollRect;
|
| | | private Dictionary<int, ObjBuff> objBuffic;
|
| | | private List<int> _SortList = new List<int>();//排序列表
|
| | | BuffModel m_BuffModel;
|
| | | BuffModel Buffmodel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_BuffModel ?? (m_BuffModel = ModelCenter.Instance.GetModel<BuffModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | BuffModel Buffmodel { get { return ModelCenter.Instance.GetModel<BuffModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | BuffModel.Even_ObjDelBuff -= DelBuff;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
|
| | |
|
| | | void UpdateControllerPosition()
|
| | |
| | | {
|
| | | int Type = 0;
|
| | | return Type;
|
| | | int Use_TheSecond = Mathf.FloorToInt((float)(DateTime.Now - objBuffic[BuffID]._dattTime).TotalSeconds);
|
| | | if (objBuffic[BuffID].LastTime - Use_TheSecond > 0)
|
| | | {
|
| | | float time = objBuffic[BuffID].LastTime - Use_TheSecond;
|
| | | if (time >= 86400)//天
|
| | | {
|
| | | return 4;
|
| | | }
|
| | | else if (time < 86400 && time >= 3600)//时
|
| | | {
|
| | | return 3;
|
| | | }
|
| | | else if (time < 3600 && time >= 60)//分
|
| | | {
|
| | | return 2;
|
| | | }
|
| | | else if (time < 60 && time > 0)//秒
|
| | | {
|
| | | return 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | | List<int> Priority()
|
| | |
| | | return _List;
|
| | | }
|
| | |
|
| | | void AddBuff()//buff的增加
|
| | | void AddBuff()
|
| | | {
|
| | |
|
| | | objBuffic = Buffmodel._BuffDic;
|
| | | BuffScheduling();
|
| | | UpdateControllerPosition();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | |
|
| | | void DelBuff()//buff的删除
|
| | | void DelBuff()
|
| | | {
|
| | |
|
| | | objBuffic = Buffmodel._BuffDic;
|
| | | BuffScheduling();
|
| | | UpdateControllerPosition();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
|