Beispiel #1
0
    void Start()
    {
        gameObject.Play(RotateAction.Create(end, isRelative, duration, Ease.FromType(easeType), direction));

        // Self-destroy
        Destroy(this);
    }
Beispiel #2
0
    public BaseAction GetAction()
    {
        if (actionType == ActionType.Move)
        {
            return(MoveAction.Create(v31, b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Scale)
        {
            return(ScaleAction.Create(v31, b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Rotate)
        {
            return(RotateAction.Create(f1, b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Fade)
        {
            return(FadeAction.Create(f1, b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Tint)
        {
            return(TintAction.Create(c1.RGB(), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Delay)
        {
            return(DelayAction.Create(duration));
        }

        return(null);
    }
Beispiel #3
0
    void Start()
    {
        gameObject.Play(RotateAction.Create(end.Variance(variance), isRelative, duration, Ease.FromType(easeType), direction),
                        () => {
            Debug.Log("Finish Rotate ACtion Scripts");
        }
                        );

        // Self-destroy
        Destroy(this);
    }
Beispiel #4
0
    public BaseAction GetAction()
    {
        if (actionType == ActionType.Move)
        {
            return(MoveAction.Create(v31.VarianceXY(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.HorizontalMove)
        {
            return(HMoveAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.VerticalMove)
        {
            return(VMoveAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Scale)
        {
            return(ScaleAction.Create(v31.VarianceXY(variance), b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Rotate)
        {
            return(RotateAction.Create(f1.Variance(variance), b1, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Fade)
        {
            return(FadeAction.Create(f1.Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.Tint)
        {
            return(TintAction.Create(c1.RGB().Variance(variance), b1, b2, duration, Ease.FromType(easeType), direction));
        }

        if (actionType == ActionType.SetPosition)
        {
            return(SetPositionAction.Create(v31, v32, b1, b2));
        }

        if (actionType == ActionType.SetScale)
        {
            return(SetScaleAction.Create(v31, v32, b1));
        }

        if (actionType == ActionType.SetRotation)
        {
            return(SetRotationAction.Create(f1, f2));
        }

        if (actionType == ActionType.SetAlpha)
        {
            return(SetAlphaAction.Create(f1, f2, b1));
        }

        if (actionType == ActionType.SetRGB)
        {
            return(SetRGBAction.Create(c1.RGB(), c2.RGB(), b1));
        }

        if (actionType == ActionType.Delay)
        {
            return(DelayAction.Create(duration, f2));
        }

        if (actionType == ActionType.AnimatorTrigger)
        {
            return(AnimatorTriggerAction.Create(s1));
        }

        if (actionType == ActionType.PlaySound)
        {
            return(PlaySoundAction.Create(soundId, soundType, f1));
        }

        if (actionType == ActionType.CallEvent)
        {
            return(CallEventAction.Create(e1));
        }

        if (actionType == ActionType.PlayParticleSystem)
        {
            return(PlayPSAction.Create(b1));
        }

        return(null);
    }