KimMooney/arcade/ArcadeGamesLauncher

From ggc

Jump to: navigation, search

01 package KimMooney.arcade;
02 import java.awt.Color;
03 import java.awt.event.KeyEvent;
04 import arcade.*;
05 
06 import fang.*;
07 
08 /**
09 @author Kim Mooney       
10 */
11 public class ArcadeGamesLauncher extends GameLoop
12 {
13   private ArcadeGames topLevel;
14 
15   public void startGame()
16   {
17     topLevel=new ArcadeGames();
18     topLevel.setName("Kim's Arcade Games");
19     setNextLevel(topLevel);
20 
21     StringSprite toFinish=new StringSprite("Press ESC/nto end game");
22     toFinish.rightJustify();
23     toFinish.bottomJustify();
24     toFinish.setScale(0.2);
25     toFinish.setLocation(0.980.98);
26     toFinish.setColor(new Color(255255064));
27     canvas.addSprite(toFinish);
28     topLevel.persist(toFinish);
29   }
30   public void advanceFrame(double timeElapsed)
31   {
32     if(getPlayer().getKeyboard().getLastKey()==KeyEvent.VK_ESCAPE)
33       finishLevel();
34     if(getLevelNumber()==0)
35       setNextLevel(topLevel);
36   }
37   public static void main(String[]arges)
38   {
39     new ArcadeLauncher().runAsApplication();
40   }
41 }
42 /**
43 *Looked at Wackadot Launcher that Mr. Jenkins created
44 */


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