| | |
| | | [SerializeField] RectTransform floorUI; //掉落道具显示的父类
|
| | | [SerializeField] FloorItemCell floorItemCell; //非装备显示组件
|
| | | [SerializeField] MoneyMoveByPath moneyMoveByPathCell; //掉落物金钱
|
| | | [SerializeField] RectTransform defaultDropRect; //默认掉落位置
|
| | |
|
| | | FloorItemCell[] floorItemCells = new FloorItemCell[20]; //包含非装备的战利品掉落
|
| | | MoneyMoveByPath[] moneyMoveByPathArr = new MoneyMoveByPath[20]; //掉落货币,金钱,经验等
|
| | |
| | | //主界面切换模式触发
|
| | | private void OnEnable()
|
| | | {
|
| | | //bug记录:再防范一次,重登销毁后意外的注册了多次,后续检查返回登录界面再进入游戏的情况
|
| | | EquipModel.Instance.OnItemDropEvent -= NotifyPlayItemDrop;
|
| | | PackManager.Instance.DeleteItemEvent -= DeleteDropItem;
|
| | | //主界面打开和显隐都要刷新
|
| | | Display();
|
| | | Display(true, EquipModel.Instance.lastDropIndexs);
|
| | | EquipModel.Instance.OnItemDropEvent += NotifyPlayItemDrop;
|
| | | PackManager.Instance.DeleteItemEvent += DeleteDropItem;
|
| | | }
|
| | |
| | | item.SetActive(false);
|
| | | continue;
|
| | | }
|
| | | if (indexList != null && !indexList.Contains(i))
|
| | | if (!indexList.IsNullOrEmpty() && !indexList.Contains(i))
|
| | | {
|
| | | //不干涉其他掉落物品
|
| | | continue;
|
| | | }
|
| | | if (item.isActiveAndEnabled)
|
| | | {
|
| | | //防范一直播放掉落动画,某种原因被打断了后续的界面显示,这里直接触发打开界面
|
| | | EquipModel.Instance.CalcFloorEquip(i);
|
| | | continue;
|
| | | }
|
| | |
|
| | | item.SetActive(true);
|
| | | item.Display(i, isAnimate, rect);
|
| | | |
| | | item.Display(i, isAnimate, rect == null ? defaultDropRect : rect);
|
| | | }
|
| | | }
|
| | |
|