| | |
| | | /// <param name="targetPosition">目的地坐标</param>
|
| | | /// <param name="moneyType">货币类型</param>
|
| | | /// <param name="num">掉几个货币</param>
|
| | | public void PlayAnimation(int moneyType, int num)
|
| | | /// <param name="type">1 货币 2 物品</param>
|
| | | public void PlayAnimation(int id, int num, int type = 1)
|
| | | {
|
| | | int createImgCnt = 0;
|
| | | if (imgMoneys.IsNullOrEmpty())
|
| | |
| | | //挂父节点
|
| | | imgMoney.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | var moneyImg = imgMoney.GetComponent<ImageEx>();
|
| | | moneyImg.SetIconWithMoneyType(moneyType);
|
| | | if (type == 1)
|
| | | moneyImg.SetIconWithMoneyType(id);
|
| | | else
|
| | | moneyImg.SetItemSprite(id);
|
| | | moneyImg.raycastTarget = false;
|
| | | moneyImg.GetComponent<RectTransform>().sizeDelta = IconSize;
|
| | | imgMoneys.Add(moneyImg);
|