NetDragons Creed Posters | BBBY Stock Chart
Games | Free Web Hosting | DVD | Books | Shop | Posters
Google
Name
Password
Save Password?



[-]NetDragons.com
[-]Games
 | [-]24 Hour Games
 |  | [-]Nelzan
 |  |  | [+]Capital Ships
 |  |  | [+]Light Fighters
 |  |  | [+]Medium Fighters
 |  |  | [+]Play It Now!
 |  |  | [+]Player
 |  |  | [+]Forum
 |  |  | [-]Source Code
 |  | [+]Space Frag I
 |  | [+]GNet Server
 |  | [+]About
 |  | [+]Forum
 |  | [+]License
 | [+]Cards of Tridala
 | [+]Flash Games
 | [+]Vagabond's Quest+
 | [+]Vagabond's Quest v.2
 | [+]Projects
[+]NetDragons.com Live!
[+]Reward Center
[+]Software Center
[+]Company Information
[+]Personal Services
[+]Member Directory
[+]Free E-mail
[+]Buy Cool Stuff
[+]Posters
[+]Your Privacy

Class Nelzan


[ Source | Index | Back To Nelzan ]

public class Nelzan
extends Applet
implements Runnable
Nelzan - A Space Arcade Game.

This Class handles state control, thread control, user input and game level logic.


Variable Index

 o level
Variable hold what level the player is currently on
 o pause
Use To Tell if the Game is pasued or not.

Constructor Index

 o Nelzan()

Method Index

 o init()
Starts that Applets execution
 o keyDown(Event, int)
Handles Events when Keys are pressed.
 o keyUp(Event, int)
Handles Events when Keys are let go.
 o mouseEnter(Event, int, int)
Checks to see when the mouse enters the Applet window.
 o mouseExit(Event, int, int)
Checks to see when the mouse leaves the Applet window.
 o paint(Graphics)
This fuction paints everything for the user to See.
 o run()
Handles Thread execution.
 o start()
Starts Thread execution
 o stop()
Stops thread execution.
 o update(Graphics)
Override of update to prevent clearing of screen.

Variables

 o pause
 public boolean pause
Use To Tell if the Game is pasued or not.

 o level
 public int level
Variable hold what level the player is currently on

Constructors

 o Nelzan
 public Nelzan()

Methods

 o init
 public void init()
Starts that Applets execution

Overrides:
init in class Applet
 o start
 public void start()
Starts Thread execution

Overrides:
start in class Applet
 o stop
 public void stop()
Stops thread execution.

Overrides:
stop in class Applet
 o mouseEnter
 public boolean mouseEnter(Event evt,
                           int x,
                           int y)
Checks to see when the mouse enters the Applet window. When it does, the game is unpasued automatically.

Parameters:
evt - the mouse event
x - x location mouse entered
y - y location mouse entered
Returns:
false always
Overrides:
mouseEnter in class Component
 o mouseExit
 public boolean mouseExit(Event evt,
                          int x,
                          int y)
Checks to see when the mouse leaves the Applet window. When it does the game is paused automatically.

Parameters:
evt - the mouse event
x - x location mouse entered
y - y location mouse entered
Returns:
false always
Overrides:
mouseExit in class Component
 o keyDown
 public boolean keyDown(Event evt,
                        int key)
Handles Events when Keys are pressed. All KeyEvents are handled by this function, to provide gameplay most like and arcade game tags inside of Player are changed to true on keyDown.

Parameters:
evt - The Event ID
key - The Key Pressed
Returns:
false if state is not handling user Input true otherwise
Overrides:
keyDown in class Component
See Also:
setMoveTrue
 o keyUp
 public boolean keyUp(Event evt,
                      int key)
Handles Events when Keys are let go. All KeyEvents are canceled by this function, to provide gameplay most like an Arcade game tags inside of Player are changed to false on keyUp.

Parameters:
evt - The Event ID
key - The Key Pressed
Returns:
true always.
Overrides:
keyUp in class Component
 o run
 public void run()
Handles Thread execution. If game is not paused both gameLogic() and repaint() is called, otherwise just repaint() is called.

 o paint
 public synchronized void paint(Graphics g)
This fuction paints everything for the user to See. Depending on the state, different fuctions are called from different classes.
  • LOADSYSTEM - GAMEINST calls drawState(offscreenG);
  • LEVELIMAGE - LEVELDELAY calls drawLevelState(offscreenG);
  • LEVELPLAY calls ms.paint(offscreenG), me.paint(offscreenG), enemy.paint(offscreenG), and paintPannel(offscreenG);

Parameters:
g - Where to paint to;
Overrides:
paint in class Container
 o update
 public void update(Graphics g)
Override of update to prevent clearing of screen.

Overrides:
update in class Container
ND: VQ+, Mail, Shop, Free Web Hosting CA Stock Chart

MICC Stock Chart
Copyrighted �, 2000, 2001 by NetDragons.com
Last Updated Saturday, December 5, 1998 - 18:37 EST