intro/SpinExample

From ggc

Jump to: navigation, search

01 package intro;
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 SpinExample extends Game
12 {
13   private PolygonSprite poly;
14 
15   /**sets up the game*/
16   public void setup()
17   {
18     poly=new PolygonSprite(4);
19     poly.setSize(0.5);
20     poly.setLocation(0.50.5);
21     addSprite(poly);
22 
23     Spinner spinner;
24     spinner=new Spinner(0);
25     spinner.setRotationDegrees(45);
26 
27     poly.addTransformer(spinner);
28   }
29 
30   /**handle input and game events*/
31   public void advance()
32   {}
33 }


Download/View intro/SpinExample.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