arcade/DealLauncher

From ggc

Jump to: navigation, search

01 package arcade;
02 import java.awt.Color;
03 import java.awt.event.KeyEvent;
04 
05 import fang.*;
06 
07 /**
08  * This class simply launches the ArcadeGame.
09  @author Jam Jenkins              
10  */
11 public class DealLauncher extends GameLoop
12 {
13   private ArcadeGame topLevel;
14 
15   /**
16    * sets the level at which to start
17    */
18   public void startGame()
19   {
20     topLevel=new DealArcade();
21     topLevel.setName("Wackadot");
22     setNextLevel(topLevel);
23 
24     StringSprite toFinish=new StringSprite("Press ESC\nto end game");
25     toFinish.rightJustify();
26     toFinish.bottomJustify();
27     toFinish.setScale(0.2);
28     toFinish.setLocation(0.980.98);
29     toFinish.setColor(new Color(255255064));
30     canvas.addSprite(toFinish);
31     topLevel.persist(toFinish);
32   }
33 
34   /**
35    * enables the Escape key to finish the level at any time
36    */
37   public void advanceFrame(double timeElapsed)
38   {
39     if(getPlayer().getKeyboard().getLastKey()==KeyEvent.VK_ESCAPE)
40       finishLevel();
41     if(getLevelNumber()==0)
42       setNextLevel(topLevel);
43   }
44 
45   /**
46    * runs the game as an application
47    @param args not used
48    */
49   public static void main(String[] args)
50   {
51     new ArcadeLauncher().runAsApplication();
52   }
53 }

Compiler Errors:
----------
1. ERROR in arcade/DealArcade.java (at line 22)
	addArcadeLevel(new Val.LetsMakeADealLevel());
	                   ^^^^^^^^^^^^^^^^^^^^^^
Val.LetsMakeADealLevel cannot be resolved to a type
----------
----------
2. ERROR in GBell/DoorGameLevel.java (at line 74)
	prize=new ImageSprite (Wiki.getMedia("Gbellbluesmile.gif"));
The public type ValLetsMakeADealLevel must be defined in its own file
----------
37. ERROR in Val/LetsMakeADea

Download/View arcade/DealLauncher.java




Views
Personal tools
Add to 
del.icio.usAdd to 
diggAdd to 
FacebookAdd to 
favoritesAdd to 
GoogleAdd to 
MySpaceAdd to 
PrintAdd to 
SlashdotAdd to 
StumbleUponAdd to 
Twitter