예제 #1
0
    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)
        {
        }
    }
예제 #2
0
    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);
    }
예제 #3
0
    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);
    }