Animation
Animation
Animation
1. Trace the edge! You will create a rectangle that moves around the 4 edges of the drawing panel, leaving a trace as it goes.
USEFUL CODE:
try {
Thread.sleep(# of milliseconds);
} catch (InterruptedException ex) {}
2. Back and forth! You will create an oval or rectangle that moves between two positions.
*You will have to ERASE the old images.
3. Bouncing ball! You will create an animation of a ball that bounces around the screen.
4. Final Project! Your animation should consist of the following:
- a main class that runs the animation, using instances of the classes you create and their methods to make something cool happen
- at least two classes that draw different characters
- these classes should have the following types of methods:
- basic draw method (takes position as parameters) - uses the Graphics drawing methods
- erase method
- move method (takes x-change and y-change as parameters)
- moveTo method (takes new position and speed of move as parameters)
- color change method (takes new color as parameter) - doesn't have to change full color
- special way of changing the image
- getX
- getY