| | |
| | | [SerializeField] FloorItemCell floorItemCell; //非装备显示组件
|
| | | [SerializeField] MoneyMoveByPath moneyMoveByPathCell; //掉落物金钱
|
| | | [SerializeField] RectTransform defaultDropRect; //默认掉落位置
|
| | |
|
| | | [SerializeField] Text[] expTexts;
|
| | | FloorItemCell[] floorItemCells = new FloorItemCell[20]; //包含非装备的战利品掉落
|
| | | MoneyMoveByPath[] moneyMoveByPathArr = new MoneyMoveByPath[20]; //掉落货币,金钱,经验等
|
| | |
|
| | |
| | | Display(true, EquipModel.Instance.lastDropIndexs);
|
| | | EquipModel.Instance.OnItemDropEvent += NotifyPlayItemDrop;
|
| | | PackManager.Instance.DeleteItemEvent += DeleteDropItem;
|
| | | for (int i = 0; i < expTexts.Length; i++)
|
| | | {
|
| | | expTexts[i].text = "";
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | }
|
| | |
|
| | |
|
| | | void NotifyPlayItemDrop(List<int> itemIndexs, RectTransform rect)
|
| | | void NotifyPlayItemDrop(BattleDrops drops)
|
| | | {
|
| | | Display(true, itemIndexs, rect);
|
| | | if (drops.dropItemPackIndex.Count > 0)
|
| | | {
|
| | | Display(true, drops.dropItemPackIndex, drops.rectTransform);
|
| | | }
|
| | | DisplayExp(drops);
|
| | | }
|
| | |
|
| | | int expIndex = 0;
|
| | | void DisplayExp(BattleDrops drops)
|
| | | {
|
| | | // startPos = new Vector2(transform.localPosition.x + UnityEngine.Random.Range(-30, 30), transform.localPosition.y + UnityEngine.Random.Range(50, 100));
|
| | |
|
| | | if (drops.expDrops.Count > 0)
|
| | | {
|
| | | var nowIndex = expIndex;
|
| | | expTexts[nowIndex].text = "E+" + (drops.expDrops[0].Exp + drops.expDrops[0].ExpPoint * Constants.ExpPointValue);
|
| | | expTexts[nowIndex].transform.position = drops.rectTransform.position;
|
| | | expTexts[nowIndex].transform.DOLocalMove(expTexts[nowIndex].transform.localPosition + new Vector3(0, 20, 0), 1f).SetEase(Ease.InOutSine).onComplete = () =>
|
| | | {
|
| | | expTexts[nowIndex].text = "";
|
| | | };
|
| | | |
| | | expIndex = (expIndex + 1) % 6;
|
| | | }
|
| | | }
|
| | |
|
| | | void DeleteDropItem(PackType packType, string guid, int itemID, int index, int clearType)
|
| | | {
|