|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object erland.game.tileadventure.TileAdventureModel
public class TileAdventureModel
Implementation of the main game model that handles all the logic in the game
Field Summary | |
---|---|
protected IrregularBlockContainerInterface |
cont
Block container for the game area |
protected GameEnvironmentInterface |
environment
Game environment object |
protected Vector |
objectList
Object list |
protected MapObjectContainerInterface |
roomMap
Room map |
Constructor Summary | |
---|---|
TileAdventureModel()
|
Method Summary | |
---|---|
void |
endActionOnObject(GameObject obj,
Action action)
|
MapDrawInterface |
getMap(GameObject player)
|
void |
init(GameEnvironmentInterface environment,
IrregularBlockContainerInterface cont)
Initiate the model |
void |
initPlayers(GameObject[] players)
|
ActionInterface |
isActionPossibleOnObject(GameObject obj,
Action action)
|
boolean |
isFree(GameObject obj,
Box3D boundingBox)
|
boolean |
isFree(GameObject obj,
float x,
float y,
float z)
|
boolean |
isFree(MapObjectContainerInterface map,
GameObject obj,
float x,
float y,
float z)
|
boolean |
move(GameObject obj,
float x,
float y,
float z)
|
void |
register(ActionInterface action)
|
ActionInterface |
startActionOnObject(GameObject obj,
Action action)
|
void |
unregister(ActionInterface action)
|
void |
update()
Update model, this will move all cars, check for collisions and apply frictions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IrregularBlockContainerInterface cont
protected GameEnvironmentInterface environment
protected MapObjectContainerInterface roomMap
protected Vector objectList
Constructor Detail |
---|
public TileAdventureModel()
Method Detail |
---|
public void init(GameEnvironmentInterface environment, IrregularBlockContainerInterface cont)
environment
- Game environmentcont
- Block container for the trackpublic void initPlayers(GameObject[] players)
public void update()
public MapDrawInterface getMap(GameObject player)
public boolean isFree(MapObjectContainerInterface map, GameObject obj, float x, float y, float z)
public boolean isFree(GameObject obj, float x, float y, float z)
public boolean isFree(GameObject obj, Box3D boundingBox)
public boolean move(GameObject obj, float x, float y, float z)
move
in interface GameObjectMapActionInterface
public ActionInterface isActionPossibleOnObject(GameObject obj, Action action)
public ActionInterface startActionOnObject(GameObject obj, Action action)
public void endActionOnObject(GameObject obj, Action action)
public void register(ActionInterface action)
register
in interface ActionHandlerInterface
public void unregister(ActionInterface action)
unregister
in interface ActionHandlerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |