Class StoryLine
[ Source
| Index
| Back to Nelzan ]
- public class StoryLine
- extends Object
StoryLine - Downloads and displays Information dealing with a plot line.
This Class simple makes a request for a file from the weapon, downloads
it and stores the information to be displayed.
-
comp
- Intance of Applet, for call backs.
-
count
-
-
data
- Information to be displayed.
-
dataFile
-
-
font
- Font to be Used.
-
length
-
-
subCount
-
-
type
- Type of Information the line is.
-
StoryLine(int, Applet)
- Creates and new instance of the class and downloads the correct file.
-
buildNew(int)
- Creates new arrays of the correct length so we can store
Information.
-
canContinue()
- Determins if the player can hit any key to continue.
-
getFile(int)
- Gets a file from the web and stores the information in arrays.
-
paint(Graphics)
- Paints the story line information.
-
toInt(String)
- Converts a String to an int;
-
update()
- Updates the length of the messages.
type
private int type[]
- Type of Information the line is.
data
private String data[]
- Information to be displayed.
font
private Font font
- Font to be Used.
comp
private Applet comp
- Intance of Applet, for call backs.
count
private int count
subCount
private int subCount
length
private int length
dataFile
private URL dataFile
StoryLine
StoryLine(int level,
Applet c)
- Creates and new instance of the class and downloads the correct file.
- Parameters:
- level - Player's Current level.
- c - Instance of an Applet, for call backs.
update
public void update()
- Updates the length of the messages. It's best for it to look like the
message is being download one line at a time.
canContinue
public boolean canContinue()
- Determins if the player can hit any key to continue.
- Returns:
-
true if the number of lines being
display is equal to the total number of lines,
false otherwise.
paint
public void paint(Graphics g)
- Paints the story line information.
- Parameters:
- g - Graphics to paint to.
getFile
private void getFile(int i)
- Gets a file from the web and stores the information in arrays.
- Parameters:
- i - Level to download.
buildNew
private void buildNew(int i)
- Creates new arrays of the correct length so we can store
Information.
- Parameters:
- i - Length required.
toInt
private int toInt(String s)
- Converts a String to an int;
- Parameters:
- s - The String to be converted
- Returns:
- an
int value from s
|