Scenery Creation


The User Interface

Maze3D invokes MazeManager, BirdsEye, SecondViewPanel, and WrapMaze3D objects. The latter three are subclasses of JPanel, which Maze3D organizes using the layout shown in Figure 25-6.

Figure 25-6. Maze3D GUI layout


The fragment of code below contains the invocation of these four objects and shows that MazeManager is required by all the JPanel objects:

     MazeManager mm = new MazeManager(fnm);   // fnm holds maze plan     BirdsEye be = new BirdsEye(mm);     SecondViewPanel secondVP = new SecondViewPanel(mm);     WrapMaze3D w3d = new WrapMaze3D(mm, be, secondVP.getCamera2TG(  ) ); 

The GUI is made with the BirdsEye object (the bottom-right panel in Figure 25-6), the SecondViewPanel object (the top-right panel in Figure 25-6), and the WrapMaze3D object (the lefthand panel).



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