Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
C
D
E
F
G
H
I
K
M
O
P
R
S
T
U
V
X
Y
A
add(IGameObject)
- Method in class uk.ac.ic.doc.game.
Game
Adds object to the game.
add(IGameObject)
- Method in interface uk.ac.ic.doc.game.
IGame
Adds object to the game.
addCollisionListener(IGameObject, ICollisionListener)
- Method in class uk.ac.ic.doc.game.
Game
Registers a collision listener that will be notified whenever a collision occurs between object and any other IGameObject.
addCollisionListener(IGameObject, ICollisionListener)
- Method in interface uk.ac.ic.doc.game.
IGame
Registers a collision listener that will be notified whenever a collision occurs between object and any other IGameObject.
addKeyListener(IGameObject, Key, IKeyListener)
- Method in class uk.ac.ic.doc.game.
Game
Registers a key listener that will be notified whenever the given key is pressed.
addKeyListener(IGameObject, Key, IKeyListener)
- Method in interface uk.ac.ic.doc.game.
IGame
Registers a key listener that will be notified of every timer tick that occurs while the given key is pressed.
addScreenExitListener(IGameObject, IScreenExitListener)
- Method in class uk.ac.ic.doc.game.
Game
Registers a screen exit listener that will be notified whenever object leaves the screen.
addScreenExitListener(IGameObject, IScreenExitListener)
- Method in interface uk.ac.ic.doc.game.
IGame
Registers a screen exit listener that will be notified whenever object leaves the screen.
addTimerListener(IGameObject, ITimerListener)
- Method in class uk.ac.ic.doc.game.
Game
Registers a timer listener that will be called after every cycle of the main game loop.
addTimerListener(IGameObject, ITimerListener)
- Method in interface uk.ac.ic.doc.game.
IGame
Registers a timer listener that will be called after every cycle of the main game loop.
C
clone()
- Method in class uk.ac.ic.doc.game.
Point
D
DelayedKeyListener
- Class in
uk.ac.ic.doc.game
Adapter for the IKeyListener interface that notifies every time the key has been held down for a specific amount of time.
DelayedKeyListener(double)
- Constructor for class uk.ac.ic.doc.game.
DelayedKeyListener
Creates a DelayedKeyListener that will notify every time the registered key is held down for delay seconds.
DelayedTimerListener
- Class in
uk.ac.ic.doc.game
Adapter for the ITimerListener interface that notifies every time a specific duration of time has passed.
DelayedTimerListener(double)
- Constructor for class uk.ac.ic.doc.game.
DelayedTimerListener
Creates a DelayedTimerListener that will notify every time delay seconds of time have passed.
draw(Graphics2D, Point)
- Method in interface uk.ac.ic.doc.game.
IGameObject
Draws this object on the given graphics context at the given scale.
draw(Graphics2D, Point)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Draws this object on the given graphics context at the given scale.
E
equals(Object)
- Method in class uk.ac.ic.doc.game.
Point
F
fromKeyCode(int)
- Static method in enum uk.ac.ic.doc.game.
Key
Returns the Key that matches the given key code, or null if no such Key could be found.
G
Game
- Class in
uk.ac.ic.doc.game
This class handles the creation of a game window, drawing of objects, running of the main game loop and reading key presses.
Game()
- Constructor for class uk.ac.ic.doc.game.
Game
getPosition()
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Returns the current position of this object.
getRotation()
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Returns the current rotation of this object.
getSize()
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Returns the current size of this object.
H
hashCode()
- Method in class uk.ac.ic.doc.game.
Point
I
ICollisionListener
- Interface in
uk.ac.ic.doc.game
Listener interface for collision events.
IGame
- Interface in
uk.ac.ic.doc.game
Interface for representing games.
IGameObject
- Interface in
uk.ac.ic.doc.game
Interface for game objects.
IKeyListener
- Interface in
uk.ac.ic.doc.game
Listener interface for key press events.
IScreenExitListener
- Interface in
uk.ac.ic.doc.game
Listener interface for screen exit events.
isExitingScreen()
- Method in interface uk.ac.ic.doc.game.
IGameObject
Tests whether this object is exiting the screen.
isExitingScreen()
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Tests whether this object is exiting the screen.
isOverlapping(IGameObject)
- Method in interface uk.ac.ic.doc.game.
IGameObject
Tests whether or not this object is overlapping the given object.
isOverlapping(IGameObject)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Tests whether or not this object is overlapping the given object.
ITimerListener
- Interface in
uk.ac.ic.doc.game
Listener interface for timer events.
K
Key
- Enum in
uk.ac.ic.doc.game
Represents keys on the keyboard that a game can respond to.
M
moveBackward(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Moves this object the given amount away from the direction it is currently facing.
moveForward(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Moves this object the given amount in the direction it is currently facing.
O
onCollisionWith(IGameObject)
- Method in interface uk.ac.ic.doc.game.
ICollisionListener
Invoked whenever the object that registered this listener collides with any other object in the game.
onCreate(IGame)
- Method in interface uk.ac.ic.doc.game.
IGameObject
Called when the object is added to the game.
onCreate(IGame)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Called when the object is added to the game.
onGameStart()
- Method in class uk.ac.ic.doc.game.
Game
Called just before the main game loop is started.
onGameStart()
- Method in interface uk.ac.ic.doc.game.
IGame
Called just before the main game loop is started.
onKeyDown(double)
- Method in class uk.ac.ic.doc.game.
DelayedKeyListener
Implementation of IKeyListener method.
onKeyDown()
- Method in class uk.ac.ic.doc.game.
DelayedKeyListener
Called every time the registered key is held down for a specific duration determined by the delay value used to construct this object.
onKeyDown(double)
- Method in interface uk.ac.ic.doc.game.
IKeyListener
Invoked every timer tick while a key is pressed.
onScreenExit()
- Method in interface uk.ac.ic.doc.game.
IScreenExitListener
Invoked whenever the object that registered this listener leaves the screen.
onTimerTick(double)
- Method in class uk.ac.ic.doc.game.
DelayedTimerListener
Implementation of ITimerListener method.
onTimerTick()
- Method in class uk.ac.ic.doc.game.
DelayedTimerListener
Called every time the duration determined by the delay value used to construct this object passes.
onTimerTick(double)
- Method in interface uk.ac.ic.doc.game.
ITimerListener
Invoked after every timer tick.
P
Point
- Class in
uk.ac.ic.doc.game
Represents a point on the screen.
Point(double, double)
- Constructor for class uk.ac.ic.doc.game.
Point
Creates a new point at the given position.
R
random()
- Static method in class uk.ac.ic.doc.game.
Point
RegularPolygon
- Class in
uk.ac.ic.doc.game
An IGameObject implementation that represents a regular polygon in the game.
RegularPolygon(Point, double, double, int)
- Constructor for class uk.ac.ic.doc.game.
RegularPolygon
Constructs a new regular polygon of the given position, rotation and size with the given number of sides.
remove(IGameObject)
- Method in class uk.ac.ic.doc.game.
Game
Removes object from the game.
remove(IGameObject)
- Method in interface uk.ac.ic.doc.game.
IGame
Removes object from the game.
S
setPosition(Point)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Sets the position of this object.
setRotation(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Sets the rotation of this object.
setSize(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Sets the size of this object.
start()
- Method in class uk.ac.ic.doc.game.
Game
Creates and displays the game window, invokes the onGameStart() method in which the initial game objects should be created, then starts the main game loop.
start()
- Method in interface uk.ac.ic.doc.game.
IGame
Starts this game.
strafeLeft(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Moves this object the given amount 90-degrees clockwise to the direction it is currently facing.
strafeRight(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Moves this object the given amount 90-degrees counter-clockwise to the direction it is currently facing.
T
turnClockwise(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Turns this object clockwise by the given amount.
turnCounterClockwise(double)
- Method in class uk.ac.ic.doc.game.
RegularPolygon
Turns this object counter-clockwise by the given amount.
U
uk.ac.ic.doc.game
- package uk.ac.ic.doc.game
V
valueOf(String)
- Static method in enum uk.ac.ic.doc.game.
Key
Returns the enum constant of this type with the specified name.
values()
- Static method in enum uk.ac.ic.doc.game.
Key
Returns an array containing the constants of this enum type, in the order they're declared.
X
x
- Variable in class uk.ac.ic.doc.game.
Point
Y
y
- Variable in class uk.ac.ic.doc.game.
Point
A
C
D
E
F
G
H
I
K
M
O
P
R
S
T
U
V
X
Y
Package
Class
Use
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes