| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module terrain :: Class TerrainArea |
|
ScriptableEntity --+
|
TerrainArea
BoundaryArea| Method Summary | |
|---|---|
__init__(self,
terrain,
indexX,
indexY)
| |
Adds an occupant to the list of occupants in area. | |
Responds to agent entering area. | |
Responds to agent leaving area. | |
Executes agentEntered handler in script attached to
area. | |
Executes agentExited handler in script attached to
area. | |
Executes the current script on the specified agent. | |
Executes startPlay handler in script attached to
area. | |
Executes stopPlay handler in script attached to area. | |
Returns the density value for the terrain area. | |
Returns id for area. | |
| Array |
Returns a list of areas which are adjacent to this area. |
Returns TerrainAreaProfile object for sending over
network. | |
Returns a string name for the object that can be used by the ScriptHandler. | |
Returns True if there are any occupants in area,
otherwise False. | |
Checks if area has any occupants or if density is 1.0, in which case it cannot be entered by an agent. | |
Removes an occupant to the list of occupants in area. | |
Sets the density of the terrain area, making sure it falls within the range 0.0 - 1.0, and updating game views. | |
Sets new dimensions for area. | |
Sets location of terrain area, making sure that it is within the bounds of the terrain. | |
Called when play starts. | |
Called when play stops. | |
Updates area. | |
| Inherited from ScriptableEntity | |
Clears scripts associated with entity. | |
Executes the current script on the entity itself. | |
Returns script associated with entity. | |
Returns source code for script associated with entity. | |
Returns revisions log for script associated with entity. | |
Sets current script associated with entity. | |
| Method Details |
|---|
addOccupant(self, occupant)Adds an occupant to the list of occupants in area. |
agentEntered(self, agent)Responds to agent entering area. |
agentExited(self, agent)Responds to agent leaving area. |
executeAgentEnteredScript(self, agent)ExecutesagentEntered handler in script attached to
area.
|
executeAgentExitedScript(self, agent)ExecutesagentExited handler in script attached to
area.
|
executeScriptOnAgent(self, agent)Executes the current script on the specified agent. |
executeStartPlayScript(self)ExecutesstartPlay handler in script attached to
area.
|
executeStopPlayScript(self)ExecutesstopPlay handler in script attached to
area.
|
getDensity(self)Returns the density value for the terrain area. |
getId(self)Returns id for area. |
getNeighbours(self, *directions, **kwargs)Returns a list of areas which are adjacent to this area. If the directions are set these can be used to return only the neighbours in the specified directions. The directions are defined by compass names, 'N', 'S', 'E', 'W', 'NE', etc.
|
getProfile(self)ReturnsTerrainAreaProfile object for sending over
network.
|
getScriptIdentifier(self)Returns a string name for the object that can be used by theScriptHandler.
|
hasOccupants(self)ReturnsTrue if there are any occupants in area,
otherwise False.
|
isAccessible(self)Checks if area has any occupants or if density is 1.0, in which case it cannot be entered by an agent. |
removeOccupant(self, occupant)Removes an occupant to the list of occupants in area. |
setDensity(self, newValue)Sets the density of the terrain area, making sure it falls within the range 0.0 - 1.0, and updating game views. |
setDimensions(self, dimX, dimY)Sets new dimensions for area. |
setLocation(self, newPosX, newPosY)Sets location of terrain area, making sure that it is within the bounds of the terrain. |
startPlay(self)Called when play starts. |
stopPlay(self)Called when play stops. |
update(self, timeInterval)Updates area. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:30 2005 | http://epydoc.sf.net |