Skip to content

LitMotionAnimation.Play() with a delay? #252

@amanset

Description

@amanset

The C# controls for LitMotionAnimations right now are a bit bare. Are there any plans to add access to the Components, especially their Settings, or at least be able to play with a delay, like animation.Play(0.6f) for a 0.6 second delay?

The use case I have, and I'd love to know if there is another way around it, is when having a list of objects of the same type that have a LitMotionAnimation component but you want them to animate with a slight delay. Start animating one, wait for a delay, start animating the next etc. If the amount of objects is unknown until run time (as in they are instantiated at run time) as far as I am aware this cannot be set up with a LitMotionAnimation component.

This is a fairly common situation in GUIs. LitMotion supports it with this (taken from the LitMotion documentation):

LMotion.Create(0f, 10f, 3f)
    .WithEase(Ease.OutQuad)
    .WithDelay(2f)
    .WithLoops(4, LoopType.Yoyo);

But it unfortunately seems to be missing from LitMotionAnimation. Of course there are workarounds, using tasks or coroutines, but a simple parameter to the Play() method would be fantastic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions