example.payment.jbricks
Class Engine
java.lang.Object
example.payment.jbricks.Engine
- All Implemented Interfaces:
- java.lang.Runnable
public class Engine
- extends java.lang.Object
- implements java.lang.Runnable
This class drives the games (hence the name
engine :). It has all the level data, animates
the objects, keeps track of state, and triggers
screen redraws.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PATTERN_WIDTH
public static final int PATTERN_WIDTH
- See Also:
- Constant Field Values
TITLE
public static final int TITLE
- See Also:
- Constant Field Values
PLAY
public static final int PLAY
- See Also:
- Constant Field Values
OVER
public static final int OVER
- See Also:
- Constant Field Values
MENU
public static final int MENU
- See Also:
- Constant Field Values
Engine
public Engine(Screen screen)
keyPressed
public void keyPressed(int keycode,
int gameAction)
keyReleased
public void keyReleased(int keycode,
int gameAction)
getState
public void getState(EngineState engineState)
startGame
protected void startGame(int level)
setLastKeyPressed
public void setLastKeyPressed(long time)
levelStarted
public boolean levelStarted()
stop
public void stop()
setPaused
public void setPaused(boolean pause)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
setState
protected void setState(int state)
increaseNumOfLevels
protected void increaseNumOfLevels(int inc)
increaseNumOfLives
protected void increaseNumOfLives(int inc)
getAvailableLevels
protected int getAvailableLevels()
getAvailableLives
protected int getAvailableLives()
canBuyLevels
protected boolean canBuyLevels(int count)
canBuyLives
protected boolean canBuyLives(int count)
showMenu
protected void showMenu()
resumeGame
protected void resumeGame()