public class ExampleAnimation extends Animation
Modifier and Type | Class and Description |
---|---|
private static class |
ExampleAnimation.DummyPlayer
Dummy player instance to reuse convex object logic.
|
Modifier and Type | Field and Description |
---|---|
private static Player |
blue
Second player.
|
private static ConvexObject |
first
Leftmost object.
|
private static ConvexObject |
firstCopy
Copy of the leftmost object that is always owned by the first player.
|
static int |
HEIGHT
Height of the animation.
|
private static Player |
pink
First player.
|
private static ConvexObject |
result
The result of merging the first and third object.
|
private static ConvexObject |
second
Middle object.
|
private int |
state
Current animation state.
|
private static ConvexObject |
third
Rightmost object.
|
private long |
time
Saved timestamp for animation.
|
static int |
WIDTH
Width of the animation.
|
Constructor and Description |
---|
ExampleAnimation() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
render(java.awt.Graphics2D g)
Renders the next frame of this animation.
|
public static final int WIDTH
public static final int HEIGHT
private static final Player pink
private static final Player blue
private static final ConvexObject first
private static final ConvexObject firstCopy
private static final ConvexObject second
private static final ConvexObject third
private static final ConvexObject result
private int state
private long time