The Animated 3D Sprite


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.

The code for this application is in AnimTour3D/.




Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net