Overview
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
P
R
S
T
U
V
W
X
Y
A
A_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
act()
- Method in class nankin.zheng.gatem.model.
Role
Role's action rules.
action
- Variable in class nankin.zheng.gatem.model.
AttributeSet
addCache(DisplayCache)
- Method in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
Add a DisplayCache instance.
addCache(DisplayCache)
- Method in interface nankin.zheng.gatem.view.
CacheContainer
Add a DisplayCache instance to the container.
addGameContainer(GameContainer)
- Method in class nankin.zheng.gatem.model.
GameScheduler
Add a game container.
addRole(Role)
- Method in class nankin.zheng.gatem.model.
GameContainer
Add a new role into the role list.
addToCache(DrawCommand)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Add a DrawCommand object to DrawCommand buffer.
addToCache(DrawCommand)
- Method in interface nankin.zheng.gatem.view.
DisplayCache
Add a DrawCommand object into display buffer.
aImages
- Variable in class nankin.zheng.gatem.view.
RoleView
All the image resources that will be needed while drawing a role.
alarmLine
- Variable in class nankin.zheng.gatem.util.
GameTimer
anchoredImage
- Variable in class nankin.zheng.gatem.view.
DrawCommand
AnchoredImage
- class nankin.zheng.gatem.view.
AnchoredImage
.
Anchored Image is an image with an anchor.
AnchoredImage(Image, int, int)
- Constructor for class nankin.zheng.gatem.view.
AnchoredImage
Constructor.
attributeSet
- Variable in class nankin.zheng.gatem.model.
GameEvent
AttributeSet
- class nankin.zheng.gatem.model.
AttributeSet
.
Role's
logical
attribute set, which is provided to RoleView object for drawing.
AttributeSet()
- Constructor for class nankin.zheng.gatem.model.
AttributeSet
Constructor.
AttributeSet(Position, int, int, int)
- Constructor for class nankin.zheng.gatem.model.
AttributeSet
Constructor.
attrSet
- Variable in class nankin.zheng.gatem.model.
Role
Role's logical attribute set.
B
B_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
background
- Variable in class nankin.zheng.gatem.model.
GameContainer
A background reference is held seperately to update viewport.
Background
- class nankin.zheng.gatem.model.
Background
.
Background is in charge of the background of game, and it keeps and updates the viewport of the game.
BACKGROUND_HEIGHT
- Variable in class nankin.zheng.gatem.util.
Env
Background height (logical coordonate)
BACKGROUND_WIDTH
- Variable in class nankin.zheng.gatem.util.
Env
Background width (logical coordonate)
Background(GameContainer, Env, BackgroundView)
- Constructor for class nankin.zheng.gatem.model.
Background
Constructor.
BackgroundView
- class nankin.zheng.gatem.view.
BackgroundView
.
RoleView object of game background.
BackgroundView(Env, DisplayCache, String, AnchoredImage[])
- Constructor for class nankin.zheng.gatem.view.
BackgroundView
Constructor.
bgView
- Variable in class nankin.zheng.gatem.model.
StageLoader
BackgroundView reference.
broadcastGameEvent(GameEvent)
- Method in class nankin.zheng.gatem.model.
GameScheduler
Broadcast game event to all the active game containers.
broadcastGameEvent(GameEvent)
- Method in class nankin.zheng.gatem.model.
GameContainer
Broadcast a game event to all the roles in the roleList.
buffer
- Variable in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Buffer saves all the draw commands.
C
C_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
CacheContainer
- interface nankin.zheng.gatem.view.
CacheContainer
.
CacheContainer is a container holding several DisplayCache instances.
CacheContainerImplAsJPanel
- class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
.
CacheContainer is a container holding several DisplayCache instances.
CacheContainerImplAsJPanel(Env)
- Constructor for class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
Constructor.
caches
- Variable in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
clone()
- Method in class nankin.zheng.gatem.util.
Position
Clone a copy
clone()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Clone a copy.
container
- Variable in class nankin.zheng.gatem.model.
StageLoader
Game container.
container
- Variable in class nankin.zheng.gatem.model.
GameEvent
container
- Variable in class nankin.zheng.gatem.model.
Role
GameContainer is in charge of the communication with other roles.
CONTAINER_ACTIVE
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
CONTAINER_NOT_ACTIVE
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
containers
- Variable in class nankin.zheng.gatem.model.
GameScheduler
controller
- Variable in class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
controller
- Variable in class nankin.zheng.gatem.model.
StageLoader
Controller.
Controller
- class nankin.zheng.gatem.controller.
Controller
.
Controller gets user input (in real-time mode) and sends it to all its listeners.
Controller(KeyController, MouseController)
- Constructor for class nankin.zheng.gatem.controller.
Controller
Constructor, register itself to a MouseController and a KeyController.
copy(GameInputEvent)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Copy both key information and mouse information of ievt to itself.
copyKeyPart(GameInputEvent)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Copy the key information part of ievt to itself.
copyMousePart(GameInputEvent)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Copy the mouse information part of ievt to itself.
count()
- Method in class nankin.zheng.gatem.util.
GameTimer
Count one.
createAnchoredImage(DOMTree, String)
- Method in class nankin.zheng.gatem.model.
StageLoader
Create one AnchoredImage object from a DOMTree like
...
.
createAnchoredImageArray(DOMTree, String)
- Method in class nankin.zheng.gatem.model.
StageLoader
Create one AnchoredImage array from a DOMTree like
...
.
createdInstanceCount
- Static variable in class nankin.zheng.gatem.model.
GameEvent
createdInstanceCount
- Static variable in class nankin.zheng.gatem.model.
Role
createdInstanceCount
- Static variable in class nankin.zheng.gatem.model.
AttributeSet
createdInstanceCount
- Static variable in class nankin.zheng.gatem.view.
RoleView
createdInstanceCount
- Static variable in class nankin.zheng.gatem.view.
DrawCommand
createRoleView(DOMTree)
- Method in class nankin.zheng.gatem.model.
StageLoader
Create one RoleView object from a DOMTree like
...
.
current
- Variable in class nankin.zheng.gatem.util.
GameTimer
D
D_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
Debug
- class nankin.zheng.gatem.util.
Debug
.
This is the debug class.
Debug()
- Constructor for class nankin.zheng.gatem.util.
Debug
depth
- Variable in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
depth
- Variable in class nankin.zheng.gatem.view.
DrawCommand
direction
- Variable in class nankin.zheng.gatem.model.
AttributeSet
displayCache
- Variable in class nankin.zheng.gatem.model.
StageLoader
Display cache, which is needed while creating RoleView objects.
displayCache
- Variable in class nankin.zheng.gatem.view.
RoleView
DisplayCache reference that accepts DrawCommand and helps drawing.
DisplayCache
- interface nankin.zheng.gatem.view.
DisplayCache
.
DisplayCache instance does the actual work of drawing, that is, game frame updating.
DisplayCacheImplSwing
- class nankin.zheng.gatem.view.
DisplayCacheImplSwing
.
A default implementation of interface DisplayCache as JPanel instance (for Swing-platform).
DisplayCacheImplSwing(Env)
- Constructor for class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Constructor.
displayer
- Variable in class nankin.zheng.gatem.model.
GameScheduler
distance(Position)
- Method in class nankin.zheng.gatem.util.
Position
Calculate the distance between itself and another position.
DOMTree
- class nankin.zheng.gatem.model.
DOMTree
.
DOMTree supports some frequently-used operations on an org.w3c.dom.Node object.
DOMTree(InputStream)
- Constructor for class nankin.zheng.gatem.model.
DOMTree
Constructor, read and parse an xml file to a tree.
DOMTree(Node)
- Constructor for class nankin.zheng.gatem.model.
DOMTree
Private constructor, create a DOMTree object directly by root.
DOWN
- Static variable in class nankin.zheng.gatem.util.
Env
DOWN_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
DOWN_LEFT
- Static variable in class nankin.zheng.gatem.util.
Env
DOWN_RIGHT
- Static variable in class nankin.zheng.gatem.util.
Env
draw()
- Method in class nankin.zheng.gatem.model.
Role
Ask its RoleView object to draw the role itself.
draw(AttributeSet)
- Method in class nankin.zheng.gatem.view.
RoleView
Draw the role according to its
logical
attribute set.
DrawCommand
- class nankin.zheng.gatem.view.
DrawCommand
.
DrawCommand is an object which is passed to DisplayCache, telling it what to draw onto the screen and where and how.
DrawCommand(AnchoredImage, Position, int)
- Constructor for class nankin.zheng.gatem.view.
DrawCommand
Constructor.
drawGameFrame()
- Method in class nankin.zheng.gatem.model.
GameContainer
This method draws all the roles onto the screen without changing their status.
E
E_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
env
- Variable in class nankin.zheng.gatem.model.
GameScheduler
env
- Variable in class nankin.zheng.gatem.model.
StageLoader
Game environment, which contains some common variables.
env
- Variable in class nankin.zheng.gatem.model.
GameContainer
The game environment.
env
- Variable in class nankin.zheng.gatem.model.
Role
Env is the environment of the game.
env
- Variable in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
env
- Variable in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
env
- Variable in class nankin.zheng.gatem.view.
RoleView
Environment
Env
- class nankin.zheng.gatem.util.
Env
.
This class defines the basic constants for the game environment.
Env()
- Constructor for class nankin.zheng.gatem.util.
Env
Constructor.
equals(Object)
- Method in class nankin.zheng.gatem.util.
Position
Whether equals.
F
F_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
FILE_LOCATOR
- Static variable in class nankin.zheng.gatem.util.
Env
File locator, a Class object to locate game resources.
finalizedInstanceCount
- Static variable in class nankin.zheng.gatem.model.
GameEvent
finalizedInstanceCount
- Static variable in class nankin.zheng.gatem.view.
DrawCommand
FLAG_NUM
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
flags
- Variable in class nankin.zheng.gatem.controller.
GameInputEvent
flush()
- Method in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
Call the
flush(Object helper)
method of each DisplayCache instance.
flush()
- Method in interface nankin.zheng.gatem.view.
CacheContainer
Call the
flush()
method of each DisplayCache instance.
flush(Object)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Flush buffer and draw the game frame onto the screen.
flush(Object)
- Method in interface nankin.zheng.gatem.view.
DisplayCache
Flush display buffer.
G
GAME_EXIT
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_FAIL
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_OVER
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_PASS
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_PAUSE
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_PREFACE
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_RUNNING
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
GAME_STAGE_INTRO
- Static variable in class nankin.zheng.gatem.model.
GameScheduler
gameActivity(int)
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop while game status is unrecognizable.
GameContainer
- class nankin.zheng.gatem.model.
GameContainer
.
GameContainer is in charge of the game (frame) updating and the communications among all the roles inside it.
GameContainer(Env)
- Constructor for class nankin.zheng.gatem.model.
GameContainer
Constructor.
GameEvent
- class nankin.zheng.gatem.model.
GameEvent
.
GameEvent works as the medium of the communication among different roles.
GameEvent(int, GameContainer, Role)
- Constructor for class nankin.zheng.gatem.model.
GameEvent
Constructor with a minimun parameter list.
GameEvent(int, GameContainer, Role, AttributeSet)
- Constructor for class nankin.zheng.gatem.model.
GameEvent
Constructor with a complete parameter list.
GameException
- exception nankin.zheng.gatem.util.
GameException
.
Game exception.
GameException(String)
- Constructor for class nankin.zheng.gatem.util.
GameException
Constructor, error message must be specified.
gameFail()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_FAIL.
GameInputEvent
- class nankin.zheng.gatem.controller.
GameInputEvent
.
GameInputEvent contains user input (key or mouse) information.
GameInputEvent()
- Constructor for class nankin.zheng.gatem.controller.
GameInputEvent
Constructor.
GameInputEventListener
- interface nankin.zheng.gatem.controller.
GameInputEventListener
.
Objects what care about user input should implement this interface in order that it can register itself to Controller.
gameOver()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_OVER.
gamePass()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_PASS.
gamePause()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_PAUSE.
gamePreface()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_PREFACE While GAME_PREFACE, a preface of the game will be displayed.
gameRunning()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_RUNNING.
GameScheduler
- class nankin.zheng.gatem.model.
GameScheduler
.
A game scheduler is a container holding several game containers.
GameScheduler(Env, CacheContainer)
- Constructor for class nankin.zheng.gatem.model.
GameScheduler
Constructor.
gameStageIntro()
- Method in class nankin.zheng.gatem.model.
GameScheduler
executed in a loop during GAME_STAGE_INTRO While GAME_STAGE_INTRO, a brief introduction of this stage will be displayed.
gameStatus
- Variable in class nankin.zheng.gatem.model.
GameScheduler
GameTimer
- class nankin.zheng.gatem.util.
GameTimer
.
A timer used in the game.
GameTimer(int)
- Constructor for class nankin.zheng.gatem.util.
GameTimer
Constructor, set the max value of timer.
getAction()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Get action.
getAnchorX()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Get anchor x.
getAnchorY()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Get anchor y.
getAttributeSet()
- Method in class nankin.zheng.gatem.model.
GameEvent
Get source role attribute set.
getBackgroundHeight()
- Method in class nankin.zheng.gatem.util.
Env
Get BACKGROUND_HEIGHT.
getBackgroundWidth()
- Method in class nankin.zheng.gatem.util.
Env
Get BACKGROUND_WIDTH.
getContainer()
- Method in class nankin.zheng.gatem.model.
GameEvent
Get source game container.
getContainerStatus()
- Method in class nankin.zheng.gatem.model.
GameContainer
Get container status.
getCreatedInstanceCount()
- Static method in class nankin.zheng.gatem.model.
GameEvent
getCreatedInstanceCount()
- Static method in class nankin.zheng.gatem.model.
Role
getCreatedInstanceCount()
- Static method in class nankin.zheng.gatem.model.
AttributeSet
getCreatedInstanceCount()
- Static method in class nankin.zheng.gatem.view.
RoleView
getCreatedInstanceCount()
- Static method in class nankin.zheng.gatem.view.
DrawCommand
getDepth()
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Get depth.
getDepth()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Get depth, which represents the drawing priority of this command.
getDepth()
- Method in interface nankin.zheng.gatem.view.
DisplayCache
Get depth of this display cache.
getDirection()
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Get the direction, which is indicated by user keyboard input.
getDirection()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Get direction.
getElement(int, String)
- Method in class nankin.zheng.gatem.model.
DOMTree
Get by index the element with the given tag name.
getElementCount(String)
- Method in class nankin.zheng.gatem.model.
DOMTree
How many elements (of the given tag name) are there among its all direct children.
getFileLocator()
- Static method in class nankin.zheng.gatem.util.
Env
Get file locator.
getFinalizedInstanceCount()
- Static method in class nankin.zheng.gatem.model.
GameEvent
getFinalizedInstanceCount()
- Static method in class nankin.zheng.gatem.view.
DrawCommand
getGameStatus()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Get game status.
getId()
- Method in class nankin.zheng.gatem.model.
GameEvent
Get event id.
getImage()
- Method in class nankin.zheng.gatem.view.
AnchoredImage
Get image.
getImage()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Get image.
getMsPerFrame()
- Static method in class nankin.zheng.gatem.util.
Env
Get MS_PER_FRAME.
getMsPerFrameMin()
- Static method in class nankin.zheng.gatem.util.
Env
Get MS_PER_FRAME_MIN.
getPosition()
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Get the position where mouse is clicking.
getPosition()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Get position.
getPosition()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Get position.
getRoleName()
- Method in class nankin.zheng.gatem.view.
RoleView
Get role name.
getRoleView(String)
- Method in class nankin.zheng.gatem.model.
StageLoader
Get a RoleView object from its vector
roleViews
by role name.
getSource()
- Method in class nankin.zheng.gatem.model.
GameEvent
Get source role object.
getStageLoader()
- Method in class nankin.zheng.gatem.model.
GameContainer
Get stage loader for this container.
getStatus()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Get status.
getStepX()
- Method in class nankin.zheng.gatem.util.
Env
Get STEP_X.
getStepY()
- Method in class nankin.zheng.gatem.util.
Env
Get STEP_Y.
getTextValue()
- Method in class nankin.zheng.gatem.model.
DOMTree
Get the first text value of the node.
getViewportHeight()
- Method in class nankin.zheng.gatem.util.
Env
Get VIEWPORT_HEIGHT.
getViewportMargin()
- Method in class nankin.zheng.gatem.util.
Env
Get VIEWPORT_MARGIN.
getViewportPhysicalX(DrawCommand)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Get
physical
coordonate x of the top-left point of the image contained in cmd.
getViewportPhysicalY(DrawCommand)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Get
physical
coordonate y of the top-left point of the image contained in cmd.
getViewportStartX()
- Method in class nankin.zheng.gatem.util.
Env
Get VIEWPORT_START_X.
getViewportStartY()
- Method in class nankin.zheng.gatem.util.
Env
Get VIEWPORT_START_Y.
getViewportWidth()
- Method in class nankin.zheng.gatem.util.
Env
Get VIEWPORT_WIDTH.
getWindowHeight()
- Static method in class nankin.zheng.gatem.util.
Env
Get WINDOW_HEIGHT.
getWindowPhysicalX(int)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Adjust viewport physical coordonate x to window physical coordonate x.
getWindowPhysicalY(int)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Adjust viewport physical coordonate y to window physical coordonate y.
getWindowWidth()
- Static method in class nankin.zheng.gatem.util.
Env
Get WINDOW_WIDTH.
getX()
- Method in class nankin.zheng.gatem.view.
AnchoredImage
Get x.
getY()
- Method in class nankin.zheng.gatem.view.
AnchoredImage
Get y.
H
hasNextStage()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Whether has next stage.
hasNextStage()
- Method in class nankin.zheng.gatem.model.
StageLoader
Whether there are more stages.
I
id
- Variable in class nankin.zheng.gatem.model.
GameEvent
image
- Variable in class nankin.zheng.gatem.view.
AnchoredImage
init()
- Method in class nankin.zheng.gatem.util.
Env
Initialize all game-dependent environment variables.
init(Position, int, int)
- Method in class nankin.zheng.gatem.model.
Role
Initialize a role object.
isAlarming()
- Method in class nankin.zheng.gatem.util.
GameTimer
whether is alarming.
isElement(Node, String)
- Method in class nankin.zheng.gatem.model.
DOMTree
Whether the node is an element (with a given tag name).
isFocusable()
- Method in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
Overwrite this method in order that this JPanel can accept keyboard event.
isFocusTraversable()
- Method in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
Overwrite this method in order that this JPanel can accept keyboard event.
isInsideViewport(Image, int, int)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Whether the image is inside the viewport.
isKeyInformation()
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Which kind of information does this event contain.
isPressing(int)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Query whether a key or a mouse button is pressed.
isTimeUp()
- Method in class nankin.zheng.gatem.util.
GameTimer
whether time is up
K
KEY_FLAG_NUM
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
KeyController
- interface nankin.zheng.gatem.controller.
KeyController
.
KeyController gets keyboard input and sends it to its listener.
KeyControllerImplAsJPanelKeyListener
- class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
.
KeyControllerImplAsJPanelKeyListener()
- Constructor for class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
Default Constructor
keyInformation
- Variable in class nankin.zheng.gatem.controller.
GameInputEvent
keyPressed(KeyEvent)
- Method in class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
implements KeyListener set its own GameInputEvent according to KeyEvent.
keyReleased(KeyEvent)
- Method in class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
implements KeyListener This method does nothing.
keyTyped(KeyEvent)
- Method in class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
implements KeyListener Do not care about keyTyped event.
L
LEFT
- Static variable in class nankin.zheng.gatem.util.
Env
LEFT_CLICK
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
LEFT_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
listeners
- Variable in class nankin.zheng.gatem.controller.
Controller
GameInputEventListener list.
loader
- Variable in class nankin.zheng.gatem.model.
GameContainer
Stage loader, which loads stage information (creates RoleView and Role objects) for this container.
loadNextStage()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Load next stage into all its containers.
loadNextStage()
- Method in class nankin.zheng.gatem.model.
StageLoader
Load next stage.
loadStageData(InputStream)
- Method in class nankin.zheng.gatem.model.
StageLoader
Load a stage data file and create Role objects according to it.
M
max
- Variable in class nankin.zheng.gatem.util.
GameTimer
MIDDLE_CLICK
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
MOUSE_POSITION
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
MouseController
- interface nankin.zheng.gatem.controller.
MouseController
.
MouseController gets mouse input and sends it to its listener.
move(int)
- Method in class nankin.zheng.gatem.util.
Position
move the positon in a given direction
movePosition(int)
- Method in class nankin.zheng.gatem.model.
AttributeSet
Move position to a given direction.
MS_PER_FRAME
- Static variable in class nankin.zheng.gatem.util.
Env
Frame updating speed.
MS_PER_FRAME_MIN
- Static variable in class nankin.zheng.gatem.util.
Env
Frame updating speed limit.
N
nankin.zheng.gatem.controller
- package nankin.zheng.gatem.controller
nankin.zheng.gatem.model
- package nankin.zheng.gatem.model
nankin.zheng.gatem.util
- package nankin.zheng.gatem.util
nankin.zheng.gatem.view
- package nankin.zheng.gatem.view
newRoleViewInstance(String, AnchoredImage[])
- Method in class nankin.zheng.gatem.model.
StageLoader
Create a RoleView object according to the role name and image file names.
notifyViewport()
- Method in class nankin.zheng.gatem.model.
Background
Notify the viewport of the game to DisplayCache.
notifyViewport(Position)
- Method in class nankin.zheng.gatem.view.
BackgroundView
Pass viewport position information to DisplayCache.
P
paintComponent(Graphics)
- Method in class nankin.zheng.gatem.view.
CacheContainerImplAsJPanel
PAUSE_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
plusAction()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Action plus plus.
position
- Variable in class nankin.zheng.gatem.controller.
GameInputEvent
position
- Variable in class nankin.zheng.gatem.model.
AttributeSet
position
- Variable in class nankin.zheng.gatem.view.
DrawCommand
Position
- class nankin.zheng.gatem.util.
Position
.
Logical
position of a role on the whole map.
Position()
- Constructor for class nankin.zheng.gatem.util.
Position
Constructor.
Position(int, int)
- Constructor for class nankin.zheng.gatem.util.
Position
Constructor, create according to x and y.
print(boolean)
- Static method in class nankin.zheng.gatem.util.
Debug
print(int)
- Static method in class nankin.zheng.gatem.util.
Debug
print(String)
- Static method in class nankin.zheng.gatem.util.
Debug
println(boolean)
- Static method in class nankin.zheng.gatem.util.
Debug
println(int)
- Static method in class nankin.zheng.gatem.util.
Debug
println(String)
- Static method in class nankin.zheng.gatem.util.
Debug
R
readStageScript(String)
- Method in class nankin.zheng.gatem.model.
GameScheduler
Read stage script.
readStageScript(String)
- Method in class nankin.zheng.gatem.model.
StageLoader
Read the stage script (in xml format) and generate a DOM tree from it.
receiveGameEvent(GameEvent)
- Method in class nankin.zheng.gatem.model.
GameScheduler
Receive game event itself.
receiveGameEvent(GameEvent)
- Method in class nankin.zheng.gatem.model.
GameContainer
This method works as Role.receiveGameEvent(...) since game event may also have some impact on GameContainer.
receiveGameEvent(GameEvent)
- Method in class nankin.zheng.gatem.model.
Role
This method tries a GameEvent, decides whether to accept it or not, and if yes, take actions accordingly.
receiveGameInputEvent(GameInputEvent)
- Method in interface nankin.zheng.gatem.controller.
GameInputEventListener
Listener method while registering to Controller.
receiveGameInputEvent(GameInputEvent)
- Method in class nankin.zheng.gatem.controller.
Controller
Listener method while registering to KeyController and MouseController.
registerController(Controller)
- Method in class nankin.zheng.gatem.controller.
KeyControllerImplAsJPanelKeyListener
implements KeyController This method registers a controller to itself.
registerController(Controller)
- Method in interface nankin.zheng.gatem.controller.
MouseController
Register a Controller object as its listener.
registerController(Controller)
- Method in interface nankin.zheng.gatem.controller.
KeyController
Register a Controller object as its listener.
registerInputEventListener(GameInputEventListener)
- Method in class nankin.zheng.gatem.controller.
Controller
Register a GameInputEventListener to its listener list.
reloadStage()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Reload the current stage into all its containers.
reloadStage()
- Method in class nankin.zheng.gatem.model.
StageLoader
Reload this stage.
reset()
- Method in class nankin.zheng.gatem.util.
GameTimer
Reset timer.
RIGHT
- Static variable in class nankin.zheng.gatem.util.
Env
RIGHT_CLICK
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
RIGHT_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
Role
- class nankin.zheng.gatem.model.
Role
.
This class represents a
logical
role who lives and acts inside a game container.
Role(GameContainer, Env, RoleView)
- Constructor for class nankin.zheng.gatem.model.
Role
Constructor.
roleList
- Variable in class nankin.zheng.gatem.model.
GameContainer
Role list, containing all the active roles whose act() will be called during every frame-updating.
roleName
- Variable in class nankin.zheng.gatem.view.
RoleView
Role name.
RoleView
- class nankin.zheng.gatem.view.
RoleView
.
RoleView object saves all the image resources of a Role, and it is in charge of mapping a role's logical attributes to a certain appearance.
RoleView(Env, DisplayCache, String, AnchoredImage[])
- Constructor for class nankin.zheng.gatem.view.
RoleView
Constructor, initialize image resources.
roleViews
- Variable in class nankin.zheng.gatem.model.
StageLoader
RoleView vector.
root
- Variable in class nankin.zheng.gatem.model.
DOMTree
The root of the current subtree.
round(int, int)
- Method in class nankin.zheng.gatem.util.
Position
Round both its x and its y to the nearest block with the given width and height of the block.
roundNumber(int, int)
- Method in class nankin.zheng.gatem.util.
Position
Round number n to the nearest block whose width is step.
run()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Implements Runnable
S
scheduler
- Variable in class nankin.zheng.gatem.model.
GameContainer
Game scheduler, which schedules all the game containers.
SELECT_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
set(int, int)
- Method in class nankin.zheng.gatem.util.
Position
Initialize according to coordonates x and y
set(Position)
- Method in class nankin.zheng.gatem.util.
Position
Initialize according to another position
setAction(int)
- Method in class nankin.zheng.gatem.model.
AttributeSet
Set action.
setAlarmLine(double)
- Method in class nankin.zheng.gatem.util.
GameTimer
Set alarm line.
setBackground(Background)
- Method in class nankin.zheng.gatem.model.
GameContainer
Sets background.
setBackgroundHeight(int)
- Method in class nankin.zheng.gatem.util.
Env
Set BACKGROUND_HEIGHT.
setBackgroundWidth(int)
- Method in class nankin.zheng.gatem.util.
Env
Set BACKGROUND_WIDTH.
setContainerStatus(int)
- Method in class nankin.zheng.gatem.model.
GameContainer
Set container status.
setDepth(int)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Set depth
setDepth(int)
- Method in interface nankin.zheng.gatem.view.
DisplayCache
Set depth of this display cache.
setDirection(int)
- Method in class nankin.zheng.gatem.model.
AttributeSet
Set direction.
setFlag(int)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Set a flag by its index, which means that a corresponding key or mouse button is pressed.
setGameScheduler(GameScheduler)
- Method in class nankin.zheng.gatem.model.
GameContainer
Set game scheduler.
setKeyInformation(boolean)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Set its information kind.
setPosition(Position)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Set the position where mouse is clicking.
setPosition(Position)
- Method in class nankin.zheng.gatem.model.
AttributeSet
Set position.
setStageLoader(StageLoader)
- Method in class nankin.zheng.gatem.model.
GameContainer
Set stage loader for this container.
setStatus(int)
- Method in class nankin.zheng.gatem.model.
AttributeSet
Set status.
setViewport(Position)
- Method in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
Set viewport position.
setViewport(Position)
- Method in interface nankin.zheng.gatem.view.
DisplayCache
Set the viewport of Background.
source
- Variable in class nankin.zheng.gatem.model.
GameEvent
stageBgimage
- Variable in class nankin.zheng.gatem.model.
StageLoader
Current stage background image file name.
stageDesc
- Variable in class nankin.zheng.gatem.model.
StageLoader
Current stage description.
stageId
- Variable in class nankin.zheng.gatem.model.
StageLoader
Current stage Id.
StageLoader
- class nankin.zheng.gatem.model.
StageLoader
.
StageLoader loads a new stage and reinitialize the game.
StageLoader(Env, DisplayCache, GameContainer, Controller, String)
- Constructor for class nankin.zheng.gatem.model.
StageLoader
Constructor, sets data members and creates RoleView objects.
stageName
- Variable in class nankin.zheng.gatem.model.
StageLoader
Current stage name.
stages
- Variable in class nankin.zheng.gatem.model.
StageLoader
stages contains a DOM tree, each of whose children represents a stage.
START_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
startGame()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Start game.
status
- Variable in class nankin.zheng.gatem.model.
GameContainer
Status of the container.
status
- Variable in class nankin.zheng.gatem.model.
AttributeSet
STEP_X
- Variable in class nankin.zheng.gatem.util.
Env
Mapping from
logical
coordonate to
physical
coordonate.
STEP_Y
- Variable in class nankin.zheng.gatem.util.
Env
Mapping from
logical
coordonate to
physical
coordonate.
STILL
- Static variable in class nankin.zheng.gatem.util.
Env
T
testInitialization()
- Method in class nankin.zheng.gatem.model.
GameScheduler
Whether this game scheduler is initialized properly.
testInitialization()
- Method in class nankin.zheng.gatem.model.
Background
Verify whether this Background object is initialized properly.
testInitialization()
- Method in class nankin.zheng.gatem.model.
GameContainer
Verify whether this object is initialized properly.
testInitialization()
- Method in class nankin.zheng.gatem.model.
Role
Verify whether this object is initialized properly.
testInitialization()
- Method in class nankin.zheng.gatem.view.
RoleView
Verify whether this object is initialized properly.
toString()
- Method in class nankin.zheng.gatem.util.
Position
Convert to String.
toString()
- Method in class nankin.zheng.gatem.model.
Background
Convert to String.
toString()
- Method in class nankin.zheng.gatem.model.
Role
Convert to String.
toString()
- Method in class nankin.zheng.gatem.model.
AttributeSet
Convert to String
toString()
- Method in class nankin.zheng.gatem.view.
AnchoredImage
Convert to String.
toString()
- Method in class nankin.zheng.gatem.view.
DrawCommand
Convert to String.
U
unloadStage()
- Method in class nankin.zheng.gatem.model.
GameContainer
Unload this stage.
unsetFlag(int)
- Method in class nankin.zheng.gatem.controller.
GameInputEvent
Unset a flag by its index, which means that a corresponding key or mouse button is released.
UP
- Static variable in class nankin.zheng.gatem.util.
Env
UP_KEY
- Static variable in class nankin.zheng.gatem.controller.
GameInputEvent
UP_LEFT
- Static variable in class nankin.zheng.gatem.util.
Env
UP_RIGHT
- Static variable in class nankin.zheng.gatem.util.
Env
updateGameFrame()
- Method in class nankin.zheng.gatem.model.
GameContainer
This method updates all the roles' logical status.
V
view
- Variable in class nankin.zheng.gatem.model.
Role
RoleView is in charge of drawing.
viewport
- Variable in class nankin.zheng.gatem.model.
Background
Positon of the viewport.
viewport
- Variable in class nankin.zheng.gatem.view.
DisplayCacheImplSwing
VIEWPORT_HEIGHT
- Variable in class nankin.zheng.gatem.util.
Env
Viewport height (logical coordonate)
VIEWPORT_MARGIN
- Variable in class nankin.zheng.gatem.util.
Env
Viewport margin (logical coordonate).
VIEWPORT_START_X
- Variable in class nankin.zheng.gatem.util.
Env
Viewport start x (physical coordonate)
VIEWPORT_START_Y
- Variable in class nankin.zheng.gatem.util.
Env
Viewport start y (physical coordonate)
VIEWPORT_WIDTH
- Variable in class nankin.zheng.gatem.util.
Env
Viewport width (logical coordonate)
W
WINDOW_HEIGHT
- Static variable in class nankin.zheng.gatem.util.
Env
Window height (physical coordonate)
WINDOW_WIDTH
- Static variable in class nankin.zheng.gatem.util.
Env
Window width (physical coordonate)
X
x
- Variable in class nankin.zheng.gatem.util.
Position
x
- Variable in class nankin.zheng.gatem.view.
AnchoredImage
Y
y
- Variable in class nankin.zheng.gatem.util.
Position
y
- Variable in class nankin.zheng.gatem.view.
AnchoredImage
A
B
C
D
E
F
G
H
I
K
L
M
N
P
R
S
T
U
V
W
X
Y
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes