public static void PlayAnimation(TransformAnimationComponent target) { Move move = target.move; Scale scale = target.scale; Rotate rotate = target.rotate; AnimatedProperty property = target.animatedProperty; if (move.Enabled) { } }
public void PlayAnimation(TransformAnimationComponent target) { OnStart?.Invoke(); Coroutiner.Wait(_waitDuration, () => OnComplete?.Invoke()); if (move.Enabled) { target.transform.DOMove(startPosition + move.By, move.duration).SetEase(move.ease); } if (rotate.Enabled) { target.transform.DORotate(startRotation + rotate.By, rotate.duration).SetEase(rotate.ease); } if (scale.Enabled) { target.transform.DOScale(startScale + scale.By, scale.duration).SetEase(scale.ease); } PlayAnimatedProperty(animatedProperty); PlayAnimatedProperty(animatedProperty2); PlayAnimatedProperty(animatedProperty3); }
internal void Restore(TransformAnimationComponent target) { #if UNITY_EDITOR Debug.Log("restoring!!"); #endif if (move.Enabled) { target.transform.DOMove(startPosition, move.duration).SetEase(move.ease); } if (rotate.Enabled) { target.transform.DORotate(startRotation, rotate.duration).SetEase(rotate.ease); } if (scale.Enabled) { target.transform.DOScale(startScale, scale.duration).SetEase(scale.ease); } RestoreProperty(animatedProperty); RestoreProperty(animatedProperty2); RestoreProperty(animatedProperty3); }