| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module agents :: Class Agent |
|
ScriptableEntity --+
|
Agent
| Method Summary | |
|---|---|
__init__(self,
name,
terrain)
| |
Checks ahead of agent in terrain for obstacles. | |
Executes enterArea handler in script attached to
agent. | |
Executes exitArea handler in script attached to
agent. | |
Executes startPlay handler in script attached to
agent. | |
Executes stopPlay handler in script attached to
agent. | |
Returns name of agent. | |
Returns AgentProfile object for sending over network. | |
Returns a string name for the object that can be used by the ScriptHandler. | |
Returns a list of areas surrounding agent. | |
Changes agent to 'move' state, starts movement. | |
Moves agent by specified distances, making sure that it remains within the terrain. | |
Moves agent by specified distances and facing in that direction, making sure that it remains within the terrain. | |
Places agent at new location. | |
Sets new facing direction for agent, making sure it is withing 360 degrees. | |
Sets location of agent, making sure that it is within the bounds of the terrain. | |
Sets new speed for agent. | |
Called when play starts. | |
Changes agent to 'rest' state, stops movement. | |
Called when play stops. | |
Turns agent by specified angle. | |
Turns agent to face specified position. | |
Updates agent. | |
Updates location of agent. | |
Checks current location of agent in terrain to determine current terrain area of agent. | |
| 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 |
|---|
checkObstacles(self)Checks ahead of agent in terrain for obstacles. |
executeEnterAreaScript(self, area)ExecutesenterArea handler in script attached to
agent.
|
executeExitAreaScript(self, area)ExecutesexitArea handler in script attached to
agent.
|
executeStartPlayScript(self)ExecutesstartPlay handler in script attached to
agent.
|
executeStopPlayScript(self)ExecutesstopPlay handler in script attached to
agent.
|
getName(self)Returns name of agent. |
getProfile(self)ReturnsAgentProfile object for sending over
network.
|
getScriptIdentifier(self)Returns a string name for the object that can be used by the
|
getSurroundingAreas(self)Returns a list of areas surrounding agent. |
go(self, newSpeed=None, newFacing=None)Changes agent to 'move' state, starts movement. |
move(self, deltaX, deltaY)Moves agent by specified distances, making sure that it remains within the terrain. |
moveTowards(self, deltaX, deltaY)Moves agent by specified distances and facing in that direction, making sure that it remains within the terrain. |
placeAt(self, newX, newY)Places agent at new location. |
setDirection(self, newFacing)Sets new facing direction for agent, making sure it is withing 360 degrees. |
setLocation(self, newPosX, newPosY)Sets location of agent, making sure that it is within the bounds of the terrain. |
speed(self, newSpeed)Sets new speed for agent. |
startPlay(self)Called when play starts. |
stop(self)Changes agent to 'rest' state, stops movement. |
stopPlay(self)Called when play stops. |
turn(self, angle)Turns agent by specified angle. |
turnTo(self, x, y)Turns agent to face specified position. |
update(self, timeInterval)Updates agent. |
updateLocation(self, timeInterval)Updates location of agent. |
updateTerrainLocation(self)Checks current location of agent in terrain to determine current terrain area of agent. This method is called within the main update loop and is used to callenterArea and exitArea methods.
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:27 2005 | http://epydoc.sf.net |