parpg :: objects :: actors :: NPCBehaviour :: Class NPCBehaviour
[hide private]
[frames] | no frames]

Class NPCBehaviour

source code

fife.fife.InstanceActionListener --+    
                                   |    
                      ActorBehaviour --+
                                       |
                                      NPCBehaviour

Instance Methods [hide private]
 
__init__(self, Parent=None, Layer=None) source code
fife.Location
getTargetLocation(self)
Returns: NPC's position
source code
 
onInstanceActionFinished(self, instance, action)
What the NPC does when it has finished an action.
source code
 
idle(self)
Controls the NPC when it is idling.
source code

Inherited from ActorBehaviour: attachToLayer, getX, getY, onNewMap

Method Details [hide private]

__init__(self, Parent=None, Layer=None)
(Constructor)

source code 
Overrides: ActorBehaviour.__init__

getTargetLocation(self)

source code 
Returns: fife.Location
NPC's position

onInstanceActionFinished(self, instance, action)

source code 

What the NPC does when it has finished an action. Called by the engine and required for InstanceActionListeners.

Parameters:
  • instance (fife.Instance) - self.agent (the NPC listener is listening for this instance)
  • action (???) - ???
Returns:
None
Overrides: ActorBehaviour.onInstanceActionFinished

idle(self)

source code 

Controls the NPC when it is idling. Different actions based on the NPC's state.

Returns:
None
Overrides: ActorBehaviour.idle