jam/StringSpriteExample

From ggc

Jump to: navigation, search

01 package jam;
02 
03 import fang.*;
04 import java.awt.*;
05 import java.awt.geom.*;
06 
07 /**
08  * All about my game.
09  @author My Name Here
10  */
11 public class StringSpriteExample extends Game
12 {
13   /**an oval*/
14   private StringSprite oval;
15 
16   /**sets up the game*/
17   public void setup()
18   {
19     makeSprites();
20     addSprites();
21   }
22 
23   /**makes the sprites*/
24   private void makeSprites()
25   {
26     oval=new StringSprite("Christopher James Jenkins");
27     oval.setWidth(1);
28     oval.rightJustify();
29     oval.bottomJustify();
30     oval.setLocation(11);
31 
32     StringSprite other;
33     other=new StringSprite("JJ");
34     other.setHeight(0.1);
35     other.rightJustify();
36     other.topJustify();
37     other.setLocation(10);
38     addSprite(other);
39   }
40 
41   /**adds the sprites to the screen*/
42   private void addSprites()
43   {
44     addSprite(oval);
45   }
46 
47   /**handle input and game events*/
48   public void advance()
49   {}
50 }


Download/View jam/StringSpriteExample.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