提交
This commit is contained in:
@@ -853,8 +853,74 @@ public class GearFollower : MonoBehaviour
|
||||
if (cutCompleteSequence != null)
|
||||
{
|
||||
cutCompleteSequence.Kill();
|
||||
cutCompleteSequence = null;
|
||||
}
|
||||
|
||||
// 停止所有协程
|
||||
StopAllCoroutines();
|
||||
|
||||
// 清理特效
|
||||
if (cutLight != null)
|
||||
{
|
||||
cutLight.enabled = false;
|
||||
}
|
||||
|
||||
if (sparkVFX != null)
|
||||
{
|
||||
sparkVFX.Stop();
|
||||
}
|
||||
|
||||
// 清理切割线
|
||||
if (cutLineRenderer != null)
|
||||
{
|
||||
cutLineRenderer.positionCount = 0;
|
||||
}
|
||||
|
||||
// 停止音效
|
||||
StopDrillSfxIfPlaying();
|
||||
|
||||
// 重置目标精灵状态
|
||||
if (targetSpriteRenderer != null)
|
||||
{
|
||||
// 恢复原始状态
|
||||
targetSpriteRenderer.transform.position = originalTargetPosition;
|
||||
targetSpriteRenderer.transform.rotation = originalTargetRotation;
|
||||
targetSpriteRenderer.transform.localScale = originalTargetScale;
|
||||
|
||||
// 恢复透明度
|
||||
Color color = targetSpriteRenderer.color;
|
||||
color.a = 1f;
|
||||
targetSpriteRenderer.color = color;
|
||||
}
|
||||
|
||||
// 重置所有状态变量
|
||||
isCutting = false;
|
||||
isInTractionMode = false;
|
||||
isCutComplete = false;
|
||||
isFadingOut = false;
|
||||
isCutTextFlickering = false;
|
||||
currentState = State.Follow;
|
||||
|
||||
// 清理列表
|
||||
if (timedCutPoints != null)
|
||||
{
|
||||
timedCutPoints.Clear();
|
||||
}
|
||||
|
||||
if (cutEdgeIndices != null)
|
||||
{
|
||||
cutEdgeIndices.Clear();
|
||||
}
|
||||
|
||||
if (edgePoints != null)
|
||||
{
|
||||
edgePoints.Clear();
|
||||
}
|
||||
|
||||
if (originalEdgePoints != null)
|
||||
{
|
||||
originalEdgePoints.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// 停止音效的辅助方法
|
||||
|
||||
Reference in New Issue
Block a user