This is accomplished using WaitForSeconds. We use ‘ goto case’ to cycle between the two, but what makes the animation visible is the pause between switching. Terminal.WriteLine("freed Type 'menu' to free the rest:") Terminal.WriteLine("CONGRATUTATIONS The pets have been") Yield return new WaitForSeconds(animDelay) Terminal.WriteLine("freed! Type 'menu' to free the rest:") ![]() Terminal.WriteLine("CONGRATUTATIONS! The pets have been") Then to setup the Coroutine, we have to use IEnumerator rather than void, and we’re just going to set up a loop using ‘switch’ case _, ![]() We’re using a Coroutine to allow for a delay between animation ‘frames’, so we have to use “ StartCoroutine” to invoke the method. Turns out it was pretty simple! (Also, I’m sure there’s a bunch of ways to do this, some probably way simpler But here’s what I came up with…) void DisplayWinScreen() So for my version of the Terminal Hacker project, “Animal Liberation Force”, I wanted to bring some life into the Win screens, but I also wanted to only use coding, nothing else in Unity (just like the rest of the project). So if you’re looking at this thinking, “How did he do that for the FIRST LESSON?! I must be slow! ”… you’re not! Just keep CODING!Īlso, yes, only after I built the game, uploaded it, made the gif, and everything else… did I realize I spelled “congratulations” wrong. ![]() I wanted to mention that I DO have previous C# experience, mostly from 's Unity 2D course.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |