Example #1
0
    public void AddDuration(float extraDuration)
    {
        var anim = SLayoutAnimation.AnimationUnderDefinition();

        if (anim != null)
        {
            anim.AddDuration(extraDuration);
        }
    }
Example #2
0
    public void Animate(float duration, float delay, AnimationCurve customCurve, Action animAction, Action completeAction, SLayout owner)
    {
        // The constructor runs the animAction
        var newAnim = new SLayoutAnimation(duration, delay, animAction, completeAction, customCurve, owner);

        if (!newAnim.isComplete)
        {
            _animations.Add(newAnim);
        }
    }
Example #3
0
    public void Animatable(Action <float> customAnim)
    {
        var anim = SLayoutAnimation.AnimationUnderDefinition();

        if (anim != null)
        {
            anim.AddCustomAnim(customAnim);
        }
        else
        {
            customAnim(1.0f);
        }
    }