arcade/WackadotLauncher

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 clcass simply launches the ArcadeGame.
09  @author Jam Jenkins 
10  */
11 public class WackadotLauncher 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 WackadotArcade();
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/WackadotArcade.java (at line 22)
	addArcadeLevel(new JacobOlson.wackadot.WackadotLevel());
	                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
JacobOlson.wackadot.WackadotLevel cannot be resolved to a type
----------
----------
2. ERROR in Brandon/WackadotLevel.java (at line 30)
	ast1 = new ImageSprite(Wiki.getMedia("Asteroid.gif"));
The constructor ImageSprite(URL) is undefined
----------
36. ERROR in Valerie/Wackadot/Wackad

Download/View arcade/WackadotLauncher.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