From ggc
|
01 packagepackage is used to name the directory or folder a class is in jam;
02
03 importimport means to make the classes and/or packages available in this program wiki.Wiki;
04 importimport means to make the classes and/or packages available in this program fang.*;
05 importimport means to make the classes and/or packages available in this program java.awt.*;
06 importimport means to make the classes and/or packages available in this program java.awt.geom.*;
07
08 /**
09 * All about my game here.
10 * @authorthis is the Javadoc tag for documenting who created the source code Jam Jenkins
11 */
12 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects SpriteAlteringHelp extendsextends means to customize or extend the functionality of a class Game
13 {open braces start code blocks and must be matched with a close brace
14 /**sets up the game*/
15 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setup()
16 {open braces start code blocks and must be matched with a close brace
17 OvalSprite oval=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor OvalSprite(2, 1);
18 oval.setColor(newnew is used to create objects by calling the constructor Color(55, 155, 0));
19 oval.setSize(0.75);
20 oval.setLocation(0.5, 0.5);
21 addSprite(oval);
22
23 PolygonSprite different=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PolygonSprite(0, 0, 1, 1, 0, 1, 0.4, 0.5, 2, 1);
24 different.setColor(newnew is used to create objects by calling the constructor Color(0, 255, 255));
25 different.setSize(0.25);
26 different.setLocation(0.25, 0.5);
27 addSprite(different);
28 }close braces end code blocks and must match an earlier open brace
29
30 }close braces end code blocks and must match an earlier open brace
|
Download/View jam/SpriteAlteringHelp.java