intro/DropIt

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 DropIt extends Game
12 {
13   private Sprite dot;
14 
15   /**sets up the game*/
16   public void setup()
17   {
18     dot=new OvalSprite(0.10.1);
19     dot.setLocation(0.50.1);
20     addSprite(dot);
21   }
22 
23   /**handle input and game events*/
24   public void advance()
25   {
26     if(dot.getY()<0.5)
27       dot.translate(0.00.01);
28     else
29       dot.translate(0.00.02);
30   }
31 }


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