matthew/SpriteMosaic

From ggc

Jump to: navigation, search

001 package matthew;
002 
003 import fang.*;
004 import java.awt.*;
005 import java.awt.geom.*;
006 
007 /**
008  * All about my game.
009  @author My Name Here
010  */
011 public class SpriteMosaic extends Game
012 {
013 
014 
015   /**sets up the game*/
016   public void setup()
017   {
018     PieSprite pieman=new PieSprite(3,4,80,150);
019     pieman.setColor(Palette.getColor("Orchid"));
020     pieman.setSize(.4);
021     pieman.setLocation(.25,.25);
022     addSprite(pieman);
023 
024     PieSprite pieman2;
025     pieman2=new PieSprite (1,1,45,360);
026     pieman2.setSize (0.20);
027     pieman2.setLocation(0.75,0.25);
028     addSprite(pieman2);
029 
030 
031     OvalSprite round;
032     round=new OvalSprite(1,1);
033     round.setSize(0.1);
034     round.setLocation(0.25,0.2);
035     round.setColor(Palette.getColor("red"));
036     addSprite(round);
037 
038     OvalSprite ovalmatt;
039     ovalmatt=new OvalSprite(1,2);
040     ovalmatt.setSize(0.1);
041     ovalmatt.setLocation(0.75,0.25);
042     ovalmatt.setColor(Palette.getColor("YELLOW"));
043     addSprite(ovalmatt);
044 
045 
046     RectangleSprite square;
047     square=new RectangleSprite(5,1);
048     square.setSize(.50);
049     square.setLocation(0.50,0.7);
050     square.setColor(Palette.getColor("Lime"));
051     addSprite(square);
052 
053     LineSprite mean;
054     mean=new LineSprite(4,4,8,8);
055     mean.setSize(15);
056     mean.setLocation(.30,.20);
057     mean.setColor(Palette.getColor("Midnight Blue"));
058     addSprite(mean);
059 
060     ArcSprite arc1;
061     arc1=new ArcSprite(211800);
062     arc1.setColor(Palette.getColor("ORANGE"));
063     arc1.setSize(0.50);
064     arc1.setLocation(0.50.80);
065     addSprite(arc1);
066 
067 
068     PolygonSprite Oct;
069     Oct=new PolygonSprite(8);
070     Oct.setSize(0.25);
071     Oct.setLocation(.50,.40);
072     addSprite(Oct);
073 
074     ImageSprite image;
075     image=new ImageSprite("Ssth.png");
076     image.setSize(.20);
077     image.setLocation(.1,.9);
078     addSprite(image);
079 
080 
081     ImageSprite image2;
082     image2=new ImageSprite("Sonic.png");
083     image2.setSize(.20);
084     image2.setLocation(.9,.9);
085     addSprite(image2);
086 
087     ArcSprite arc2;
088     arc2=new ArcSprite (1175220);
089     arc2.setSize(0.15);
090     arc2.setLocation(0.50.4);
091     arc2.setColor(Palette.getColor("Red"));
092     addSprite(arc2);
093 
094     StringSprite happy;
095     happy=new StringSprite("Happy Face");
096     happy.setSize(0.30);
097     happy.topJustify();
098     happy.setLocation(0.50.05);
099     addSprite(happy);
100 
101     LineSprite line;
102     line=new LineSprite(2211);
103     line.setSize(0.15);
104     line.setLocation(0.60.8);
105     line.setColor(Palette.getColor("pink"));
106     addSprite(line);
107 
108     StringSprite name;
109     name=new StringSprite("matthew mitrovich and kcie green");
110     name.setSize(0.50);
111     name.bottomJustify();
112     name.setLocation(0.50.99);
113     addSprite(name);
114 
115     RectangleSprite rectangle;
116     rectangle=new RectangleSprite(1,1);
117     rectangle.setSize(.15);
118     rectangle.setLocation(.1,.1);
119     rectangle.setColor(Palette.getColor("orange"));
120     addSprite(rectangle);
121 
122     PolygonSprite polygon;
123     polygon=new PolygonSprite(5);
124     polygon.setSize(0.15);
125     polygon.setLocation(0.850.7);
126     polygon.setColor(Palette.getColor("white"));
127     addSprite(polygon);
128 
129     PolygonSprite cool=new PolygonSprite(.6,.7,.6,.8,.1,.6,.7,.8);
130     cool.setColor(new Color(189,99,15));
131     cool.setSize(.5);
132     cool.setLocation(.5,.75);
133     addSprite(cool);
134 
135     PolygonSprite angle=new PolygonSprite(1.5,1.5,.9,.6,.5,.5);
136     angle.setColor(new Color(189,99,50));
137     angle.setSize(.25);
138     angle.setLocation(.65,.5);
139     addSprite(angle);
140 
141 
142 
143 
144 
145 
146 
147 
148 
149 
150 
151 
152   }
153 }


Download/View matthew/SpriteMosaic.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