Animating a Fire
Now that we have our art on stage and its ready to animate its time for us to start animating. More or less at this stage we know what we want but we don't know exactly what we want. In this video we start exploring optional animations until we feel its right. We start with animating one of the layers and then learn a few more tricks regarding reusing of code and how we can reuse our animation for other layers. By the end of this video we will have a working fire. We will create a stop method that will enable us to stop our animations and start them. This is in a goal to enable us to control the animations from our main class. Notice that even though we don't actually call the touch method it will automatically trigger when user clicks on the fire when published! Nifty right? This is happening because in an earlier class we set a mouse event that calls the touch in the main - Even before we created the class everything was set in place! Really cool and exactly the point of polymorphism and interfaces. The idea of not needing to worry about totally separate blocks of code but instead building out the internal logic set knowing the external one will work as it was worked on earlier and we do not need to change anything within it.
Ready to Level Up Your Skills?
Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!
Enroll Now for Free!