|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.b3dgs.lionengine.engine.Sequence
public abstract class Sequence
Sequence class is used for each derived sequence, such as Introduction, Menu, Scene... It contains a reference to the screen used, the current configuration, input references (keyboard, mouse), and it include a standard game loop (update and render), synchronised to a specified frame rate.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
Config |
config
Config reference. |
Display |
display
Display reference. |
Filter |
filter
Filter reference. |
int |
height
Screen size (width-height). |
Initializer |
init
Initializer reference. |
Keyboard |
keyboard
Keyboard reference. |
Loader |
loader
Loader reference. |
Mouse |
mouse
Mouse reference. |
java.awt.image.AffineTransformOp |
opBilinear
Filter transformation reference. |
java.awt.image.AffineTransformOp |
opNone
Filter transformation reference. |
Rendering |
rendering
Rendering reference. |
Screen |
screen
Screen reference. |
Text |
systemText
Default font. |
int |
width
Screen size (width-height). |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Sequence(Loader loader)
Create a new blank sequence. |
Method Summary | |
---|---|
void |
end()
Terminate sequence, close screen, and start launcher if exists. |
void |
end(Sequence nextSequence)
Terminate sequence, and set the next sequence id. |
protected java.awt.image.AffineTransformOp |
getFilter()
Get the transforming filter, depending of the configuration. |
int |
getFPS()
Get current frame rate value. |
Sequence |
getNextSequence()
Get next sequence. |
protected abstract void |
load()
Loading sequence data. |
protected abstract void |
render(java.awt.Graphics2D g)
Rendering sequence. |
void |
run()
|
protected abstract void |
terminate()
Called when sequence in closing. |
protected abstract void |
update(float extrp)
Update sequence. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final Loader loader
public final Text systemText
public final Screen screen
public final Initializer init
public final Config config
public final Display display
public final Keyboard keyboard
public final Mouse mouse
public final Filter filter
public final Rendering rendering
public final java.awt.image.AffineTransformOp opNone
public final java.awt.image.AffineTransformOp opBilinear
public final int width
public final int height
Constructor Detail |
---|
public Sequence(Loader loader)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected final java.awt.image.AffineTransformOp getFilter()
protected abstract void load()
protected abstract void update(float extrp)
extrp
- current extrapolation value.protected abstract void render(java.awt.Graphics2D g)
g
- graphic ouput.protected abstract void terminate()
public void end()
public void end(Sequence nextSequence)
nextSequence
- next game reference.public Sequence getNextSequence()
public int getFPS()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |