|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The SimEnvironment is the container for all SimObjects. Interface towards a simulated World that may be simulated.
| Method Summary | |
SimObject |
createSimObject(java.lang.String name,
Owner o)
Adds a new Simulated Objects in the World |
SimObject |
createSimObject(java.lang.String name,
Owner o,
PathPlace pp)
Adds a new Simulated Objects in the World |
AbstractMap |
getAbstractMap()
Returns the Map making this world |
Owner |
getDefaultOwner()
Return the default owner for this SimEnvironment |
Owner |
getGaiaOwner()
Returns the Owner known as Gaia i.e Mother Nature |
Drawable2DObject[] |
getMiniMapDrawable2DObjects()
Returns an Array of all the Drawable2DObject the SimWorld knows about |
java.util.Vector |
getMovingSimulatedObjects()
Returns a Vector of the simulated units |
java.util.Vector |
getNotMovingSimulatedBuildings()
Returns a Vector of the simulated structures |
SimObject[][] |
getObjects(int xcenter,
int ycenter,
int halfWidth,
int halfHeight)
Returns the SimObject that can been seen in the area defined by the parameters |
RandomGenerator |
getRandonGenerator()
Returns a Random Generator for this world |
SimObjectServer |
getSimObjectServer()
Returns the SimObjectServer of the SimEnvironment |
java.util.Vector |
getSimulatedObjects()
Returns a Vector of all the simulated Objects |
SimViewer |
getSimViewer()
|
StatServer |
getStatServer()
Returns the StatServer of the SimEnvironment |
java.util.Vector |
getStructureTypesVector()
Returns a Vector of all the different SimObject of type "structure" |
java.util.Vector |
getUnitTypesVector()
Returns a Vector of all the different SimObject of type "unit" |
long |
nextSerial()
Returns the next serial number for this SimEnvironment |
void |
removeSimulatedObject(SimObject so)
Remove the given SimObject from the SimEnvironment |
void |
setSimViewer(SimViewer sv)
|
void |
updateObjectPosition(SimObject so,
PathPlace oldPathPlace,
PathPlace newPathPlace)
Update the position of the object given in parameters |
| Method Detail |
public java.util.Vector getSimulatedObjects()
public java.util.Vector getMovingSimulatedObjects()
public java.util.Vector getNotMovingSimulatedBuildings()
public AbstractMap getAbstractMap()
public java.util.Vector getStructureTypesVector()
public java.util.Vector getUnitTypesVector()
public void updateObjectPosition(SimObject so,
PathPlace oldPathPlace,
PathPlace newPathPlace)
so - The SimObject to updateoldPathPlace - the old position of the SimObject. oldPathPlace belongs to MapnewPathPlace - the new position of the SimObject.
public SimObject[][] getObjects(int xcenter,
int ycenter,
int halfWidth,
int halfHeight)
xcenter - the x coordinateycenter - the y coordinatehalfWidth - the number of coordinates we have to take into account right/left xcenterhalfHeight - the number of coordinates we have to take into account above/below ycenter
public SimObject createSimObject(java.lang.String name,
Owner o)
name - the name of the Object to createo - the Owner of this object to be made
public SimObject createSimObject(java.lang.String name,
Owner o,
PathPlace pp)
name - the name of the Object to createo - the Owner of this object to be madepp - the PathPlace where the new Object should be placedpublic Owner getDefaultOwner()
public Owner getGaiaOwner()
public Drawable2DObject[] getMiniMapDrawable2DObjects()
public SimObjectServer getSimObjectServer()
public StatServer getStatServer()
public long nextSerial()
public RandomGenerator getRandonGenerator()
public SimViewer getSimViewer()
public void removeSimulatedObject(SimObject so)
so - a SimObjectpublic void setSimViewer(SimViewer sv)
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||