Lesson 3 - Animation
This tutorial will cover how to keep move objects around, by keeping track and modifying locations as Rectangles.
Lesson 3 - Animating
What to Do?
1 - Complete the tutorial on Animation.
Text version, video version or follow along in class.
Youtube Link: https://www.youtube.com/watch?v=V_RGN2T_G28
GitHub program solution: https://github.com/AldworthClass/Part-3---Animation-Part-1
2 - Complete the Your Task programming component of the tutorial. See the tutorial for more detail:
Make sure all tribble images are added to your project.
Create a Texture2D, Rectangle and speed Vector2 for the other three tribble images you added to the project content. Give them appropriate names similar to the examples in this tutorial.
Have each tribble move in a unique way:
One horizontally only.
One vertically only.
One at a diagonal, but not travelling at a 45o angle like our example.
No tribble should permanently leave the window.
Add an appropriate background.
Have some other effect occur when a tribble hits a wall, such as:
Background color/image change, texture change, color mask change, size change, sound effect, something else?
3 - Try some of the Challenges suggested in the tutorial or your own.
Have the tribbles start at a random location when the program first starts.
Have a tribble jump to a random location when it hits a wall instead of changing direction.
You could also give it a random horizontal and vertical speed at this point too.
Instead of the tribble ‘bouncing’ off the wall when it hits the edge, allow it to walk off one side, and ‘transport’ it to the other side.
By the end you should know:
Use Vector2 to represent movements in various directions for an object you wish to animate.
How to change the speed, direction and location of the animated object.
Detect collisions with the edges of your project window.
What to Submit
1 - The completed programming task described in the tutorial, along with any completed challenges.