Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/DeactivateAmplifyMotion.cs
2026-02-21 16:45:37 +08:00

22 lines
592 B
C#

using UnityEngine;
public class DeactivateAmplifyMotion : MonoBehaviour
{
public bool withChildren = true;
private void Start()
{
AmplifyMotionObjectBase[] array = null;
array = ((!withChildren) ? GetComponents<AmplifyMotionObjectBase>() : GetComponentsInChildren<AmplifyMotionObjectBase>(true));
if (array != null)
{
AmplifyMotionObjectBase[] array2 = array;
foreach (AmplifyMotionObjectBase amplifyMotionObjectBase in array2)
{
AmplifyMotionEffect.Instance.Unregister(amplifyMotionObjectBase.gameObject);
amplifyMotionObjectBase.enabled = false;
}
}
}
}