Question by
WASD_Studios · Nov 17, 2015 at 06:24 PM ·
c#animationmobilerandom
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!
Comment
Answer by OctoMan · Nov 17, 2015 at 08:06 PM
You could set the animation speed to 0, or decrease it over time until 0.
Animator anim;
anim.speed = 0;
Your answer
![](https://koobas.hobune.stream/wayback/20220612045418im_/https://answers.unity.com/themes/thub/images/avi.jpg)