Log in to reply
 

C# How to correctly use wait for animations?



  • I have a made animation with an object fading in and out by fading out with - 10 with 200ms wait before next fade. How would that work on different FPSes? Is there a way to use wait after every frame passed?

    Here is my code

    
                while (takeOffSound.IsPlaying())
                {
                    foreach (int i in Enumerable.Range(1, 20))
                    {
                        tardis.Opacity -= 10;
                        Wait(50);
                    }
                    foreach (int i in Enumerable.Range(1, 20))
                    {
                        tardis.Opacity += 10;
                        Wait(50);
                    }
                }
    

Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.