Skip to Main Content
Killer Game Programming in Java
book

Killer Game Programming in Java

by Andrew Davison
May 2005
Intermediate to advanced content levelIntermediate to advanced
998 pages
26h
English
O'Reilly Media, Inc.
Content preview from Killer Game Programming in Java

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.

Class diagrams for AnimTour3D

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/.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Game Development with LibGDX: From Beginner to Professional

Java Game Development with LibGDX: From Beginner to Professional

Lee Stemkoski

Publisher Resources

ISBN: 0596007302Supplemental ContentErrata Page