线缆的物理表现
This commit is contained in:
@@ -23,14 +23,14 @@ public class VisualLineSegment : MonoBehaviour
|
||||
lineRenderer.SetPosition(1, EndPoint);
|
||||
}
|
||||
|
||||
public void ShrinkAndDisappear()
|
||||
{
|
||||
// Shrink the line segment from the end to the start
|
||||
DOTween.To(() => EndPoint, x => EndPoint = x, StartPoint, 1f)
|
||||
.OnUpdate(() => {
|
||||
lineRenderer.SetPosition(0, StartPoint);
|
||||
lineRenderer.SetPosition(1, EndPoint);
|
||||
})
|
||||
.OnComplete(() => Destroy(gameObject));
|
||||
}
|
||||
// public void ShrinkAndDisappear()
|
||||
// {
|
||||
// // Shrink the line segment from the end to the start
|
||||
// DOTween.To(() => EndPoint, x => EndPoint = x, StartPoint, 1f)
|
||||
// .OnUpdate(() => {
|
||||
// lineRenderer.SetPosition(0, StartPoint);
|
||||
// lineRenderer.SetPosition(1, EndPoint);
|
||||
// })
|
||||
// .OnComplete(() => Destroy(gameObject));
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user