scg/ch03/HexAndLine

From FANG

Jump to: navigation, search

01 package scg.ch03;
02 
03 import fang2.core.Game;
04 import fang2.sprites.LineSprite;
05 import fang2.sprites.PolygonSprite;
06 
07 // FANG Demonstration program: PolygonSprite and LineSprite
08 public class HexAndLine
09   extends Game {
10   // Called before game loop: make hex and line over it and add
11   @Override
12   public void setup() {
13     PolygonSprite hex = new PolygonSprite(6);
14     hex.setScale(0.5);
15     hex.setLocation(0.50.5);
16     hex.setColor(getColor("orange"));
17     addSprite(hex);
18 
19     LineSprite line = new LineSprite(0.10.90.90.1);
20     line.setColor(getColor("yellow green"));
21     addSprite(line);
22   }
23 }
24 
25 //Uploaded on Mon Mar 29 21:41:19 EDT 2010


Download/View scg/ch03/HexAndLine.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

Games
Games