Pausing animation after a random amount of seconds.

Hi!

So I’m new to C# and I was wondering if anyone know a way to start and pause an animation after a random amount of seconds between 0 and 20. I’m trying to make a “spin the bottle” kind of game and want the animation to start once you tap the screen.

Any help would be much appreciated!

You could set the animation speed to 0, or decrease it over time until 0.

Animator anim;

anim.speed = 0;