From FANG
|
01 packagepackage is used to name the directory or folder a class is in examples.levelSelect;
02 //start auto-imports
03 //end auto-imports
04
05 importimport means to make the classes and/or packages available in this program fang2.attributes.*;
06 importimport means to make the classes and/or packages available in this program fang2.core.*;
07 importimport means to make the classes and/or packages available in this program fang2.sprites.*;
08 importimport means to make the classes and/or packages available in this program fang2.transformers.*;
09
10 /**
11 * Launches the LevelSelect classclass is a group of fields and methods used for making objects that
12 * allows you to select witch level to
13 * go to.
14 * @authorthis is the Javadoc tag for documenting who created the source code Alex Park
15 * @authorthis is the Javadoc tag for documenting who created the source code modified by Jam when the
16 * FANG Engine was updated
17 * !this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to trueUnder construction - thisthis means the current object (the implicit parameter) example is currently being updated!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true!this is the not operator, which changes true to false and false to true
18 */
19 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 Launcher extendsextends means to customize or extend the functionality of a class Game
20 {open braces start code blocks and must be matched with a close brace
21 /**
22 * makes and add the sprite and next game
23 */
24 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setup()
25 {open braces start code blocks and must be matched with a close brace
26 StringSprite splash=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor StringSprite("Splash");
27 splash.setLocation(0.5, 0.5);
28 addSprite(splash);
29 addGame(newnew is used to create objects by calling the constructor LevelSelect());
30 finishGame();
31 setHelp("LevelSelect.txt");
32 }close braces end code blocks and must match an earlier open brace
33
34 /**
35 * Runs the Launcher as an application.
36 * @paramthis is the Javadoc tag for documenting the purpose of parameters args not used
37 */
38 publicpublic is used to indicate unrestricted access (any other class can have access) staticstatic means that an instance is not required for access (class level access) voidvoid means the method does not return a value mainThe main method is the place where applications begin executing. (String[brackets are typically used to declare, initialize and index (indicate which element of) arrays]brackets are typically used to declare, initialize and index (indicate which element of) arrays args)
39 {open braces start code blocks and must be matched with a close brace
40 newnew is used to create objects by calling the constructor Launcher().runAsApplication();
41 }close braces end code blocks and must match an earlier open brace
42 }close braces end code blocks and must match an earlier open brace
43
44 //Uploaded on Sat Sep 19 13:58:15 EDT 2009
|
Download/View examples/levelSelect/Launcher.java