| | |
| | | { |
| | | FlyImage fly; |
| | | |
| | | for (int i = 0; i < 5; i++) |
| | | { |
| | | fly = CreateIcon(ts); |
| | | fly.SetDestination(sp, startP, endP, useBezier); |
| | | } |
| | | yield return new WaitForSeconds(0.2f); |
| | | // for (int i = 0; i < 5; i++) |
| | | // { |
| | | // fly = CreateIcon(ts); |
| | | // fly.SetDestination(sp, startP, endP, useBezier); |
| | | // } |
| | | // yield return new WaitForSeconds(0.2f); |
| | | |
| | | for (int i = 0; i < 3; i++) |
| | | for (int i = 0; i < 15; i++) |
| | | { |
| | | fly = CreateIcon(ts); |
| | | fly.SetDestination(sp, startP, endP, useBezier); |
| | | yield return new WaitForSeconds(0.01f); |
| | | |
| | | } |
| | | |
| | | yield break; |
| | |
| | | tmpV.x -= UnityEngine.Random.Range(10, 15); |
| | | if (isUp) |
| | | { |
| | | tmpV.z += UnityEngine.Random.Range(20, 40); |
| | | tmpV.z += UnityEngine.Random.Range(10, 20); |
| | | } |
| | | else |
| | | { |
| | | tmpV.z -= UnityEngine.Random.Range(20, 40); |
| | | tmpV.z -= UnityEngine.Random.Range(10, 20); |
| | | } |
| | | |
| | | return tmpV; |
| | |
| | | /// </summary> |
| | | private void Bezier_Move() |
| | | { |
| | | if (index + 2 >= point.Count) |
| | | if (index + 3 >= point.Count) |
| | | { |
| | | //到终点了 |
| | | Close(); |
| | |
| | | { |
| | | transform.DOMove(point[index], 0.01f).OnComplete(Bezier_Move); |
| | | |
| | | index += 2; |
| | | index += 3; |
| | | } |
| | | } |
| | | |