void Start() { // cache & pause tweens. switch (direction) { case Direction.Right: (movingPlatformTween = MFX.MoveBackAndForthHorizontal(pauseTime, transform, distance, time)).Pause(); break; case Direction.Left: (movingPlatformTween = MFX.MoveBackAndForthHorizontal(pauseTime, transform, -distance, time)).Pause(); break; case Direction.Up: (movingPlatformTween = MFX.MoveBackAndForthVertical(pauseTime, transform, distance, time)).Pause(); break; case Direction.Down: (movingPlatformTween = MFX.MoveBackAndForthVertical(pauseTime, transform, -distance, time)).Pause(); break; default: Assert.IsTrue(false, ("Direction missing from switch @ " + gameObject)); break; } movingPlatformTween.Restart(); }