public abstract class GameState
extends java.lang.Object
修飾子とタイプ | フィールドと説明 |
---|---|
private int |
id |
private boolean |
idFlag |
private boolean |
initializeFlag |
protected boolean |
instant
if you want to instant in this class, this value change to true with "toInstant()" method.
|
コンストラクタと説明 |
---|
GameState() |
修飾子とタイプ | メソッドと説明 |
---|---|
int |
getId() |
abstract void |
initialize()
initialize this game state
please call the method "super.inialized()" at last of this method
if you overload this method, you have to call initialize method expressly
f you want to instant in this class, this value change to true with "toInstant()" method
|
protected void |
initialized() |
boolean |
isInitializeFlag() |
boolean |
isInstant() |
private void |
registered() |
void |
registerId(int id)
register id of this game state
if this game state is already registered, id is not changed
|
private void |
setId(int id) |
protected void |
toInstant() |
abstract void |
update(GraphicManager gm,
InputManager im)
update this game state
this method is run per frame
you can get input information from im
you can draw graphic with gm
|
private int id
private boolean initializeFlag
private boolean idFlag
protected boolean instant
public abstract void initialize()
public abstract void update(GraphicManager gm, InputManager im)
gm
- Graphic Managerim
- Input Managerpublic void registerId(int id)
id
- public int getId()
private void setId(int id)
public boolean isInitializeFlag()
protected void initialized()
private void registered()
public boolean isInstant()
protected void toInstant()