You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
746 B
35 lines
746 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using DG.Tweening;
|
|
|
|
namespace DisComputer
|
|
{
|
|
/*
|
|
* @func 零件图标飞入
|
|
* */
|
|
public class SpareFly : MonoBehaviour
|
|
{
|
|
|
|
/// <summary>
|
|
/// 零件icon飞动效
|
|
/// </summary>
|
|
/// <param name="startPos"></param>
|
|
/// <param name="endPos"></param>
|
|
/// <param name="finish"></param>
|
|
public void FlyAction(Vector3 endPos,System.Action finish)
|
|
{
|
|
this.transform.DOMove(endPos,1.5f).SetEase(Ease.OutCubic).OnComplete(()=>
|
|
{
|
|
finish?.Invoke();
|
|
Destroy(this.gameObject);
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|