Esempio n. 1
0
 private void CheckTeleportReset(AmplifyMotionEffectBase inst)
 {
     if (Vector3.SqrMagnitude(base.transform.position - this.m_lastPosition) > inst.MinResetDeltaDistSqr)
     {
         AmplifyMotionObjectBase.RecursiveResetMotionAtFrame(base.transform, this, Time.frameCount + inst.ResetFrameDelay);
     }
 }
Esempio n. 2
0
    private static void RecursiveResetMotionAtFrame(Transform transform, AmplifyMotionObjectBase obj, int frame)
    {
        if (obj != null)
        {
            obj.m_resetAtFrame = frame;
        }
        IEnumerator enumerator = transform.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object    obj2       = enumerator.Current;
                Transform transform2 = (Transform)obj2;
                AmplifyMotionObjectBase.RecursiveResetMotionAtFrame(transform2, transform2.GetComponent <AmplifyMotionObjectBase>(), frame);
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
Esempio n. 3
0
 private static void RecursiveResetMotionAtFrame(Transform transform, AmplifyMotionObjectBase obj, int frame)
 {
     if (obj != null)
     {
         obj.m_resetAtFrame = frame;
     }
     foreach (object obj2 in transform)
     {
         Transform transform2 = (Transform)obj2;
         AmplifyMotionObjectBase.RecursiveResetMotionAtFrame(transform2, transform2.GetComponent <AmplifyMotionObjectBase>(), frame);
     }
 }
Esempio n. 4
0
 public void ResetMotionAtFrame(int frame)
 {
     AmplifyMotionObjectBase.RecursiveResetMotionAtFrame(base.transform, this, frame);
 }
Esempio n. 5
0
 public void ResetMotionNow()
 {
     AmplifyMotionObjectBase.RecursiveResetMotionAtFrame(base.transform, this, Time.frameCount);
 }