Class Diagrams for AnimTour3D
Figure 19-2 shows the class diagrams for the classes in the AnimTour3D
application. Only the class names are shown to reduce the amount of detail.
AnimTour3D
is the top-level JFrame
for the application. WrapAnimTour3D
creates the 3D scene and is similar to the earlier Wrap classes in that it creates the checkered floor and lighting. It loads the stick child sprite and sets up the sprite's controlling behaviors. PropManager
is unchanged from the class in the Loader3D
application in Chapter 16. CheckerFloor
and ColouredTiles
are unchanged from previous examples.
Figure 19-2. Class diagrams for AnimTour3D
KeyBehavior
and Animator
are subclasses of Behavior
. KeyBehavior
is triggered by key presses, like those used in the Tour3D
from Chapter 18. It responds by requesting that the Animator
object adds animation sequences to its animation schedule. Animator
wakes up periodically and processes the next animation in its schedule, thereby altering the sprite.
Tip
The code for this application is in AnimTour3D/.
Get Killer Game Programming in Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.