| | |
| | | public Transform targetPosition;
|
| | | List<ImageEx> imgMoneys = new List<ImageEx>();
|
| | |
|
| | | int pointCount = 30;
|
| | | Vector3[] points = new Vector3[30];
|
| | | Vector3[] points2 = new Vector3[30];
|
| | |
|
| | | /// <summary>
|
| | | /// 播放掉落动画
|
| | | /// </summary>
|
| | |
| | | }
|
| | |
|
| | | //通过 heightCurve 生成路径,时间为x 总时间为1,y为高度,偏移量为100
|
| | | int pointCount = 30;
|
| | | Vector3[] points = new Vector3[pointCount];
|
| | |
|
| | | for (int i = 0; i < pointCount; i++)
|
| | | {
|
| | | float x = i / (pointCount - 1f);
|
| | |
| | |
|
| | | }
|
| | |
|
| | |
|
| | | |
| | |
|
| | | for (int i = 0; i < imgMoneys.Count; i++)
|
| | | {
|
| | |
| | | // x y 随机下差异
|
| | | float randX = Random.Range(0.2f, 1f);
|
| | | float randY = Random.Range(0.6f, 1f);
|
| | | Vector3[] points2 = new Vector3[pointCount];
|
| | | |
| | | for (int j = 0; j < points.Length; j++)
|
| | | {
|
| | | points2[j] = new Vector3((points[j].x + offsetX)* randDir * randX, points[j].y * randY, points[j].z);
|
| | | }
|
| | | moneyImg.transform.localPosition = points2[0];
|
| | |
|
| | |
|
| | | moneyImg.transform.DOLocalPath(points2, duration1, PathType.CatmullRom).SetEase(Ease.InOutSine).OnComplete(() =>
|
| | | {
|