blender/source/gameengine/PyDoc/KX_ActuatorSensor.py
Benoit Bolsee 1c663bbc7e First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. 
To make porting of game code easier, the properties have usually the same type and use than
the return values/parameters of the get/set methods. 
More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up

Old methods are still available but will produce deprecation warnings on the console: 

"<method> is deprecated, use the <property> property instead"

You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu.

PyDoc is updated to include the new properties and display a deprecation warning
for the get/set methods that are being deprecated.
2008-12-29 16:36:58 +00:00

33 lines
847 B
Python

# $Id$
# Documentation for KX_ActuatorSensor
from SCA_IActuator import *
from SCA_ISensor import *
class KX_ActuatorSensor(SCA_ISensor):
"""
Actuator sensor detect change in actuator state of the parent object.
It generates a positive pulse if the corresponding actuator is activated
and a negative pulse if the actuator is deactivated.
Properties:
@ivar actuator: the name of the actuator that the sensor is monitoring.
@type actuator: string
"""
def getActuator():
"""
DEPRECATED: use the actuator property
Return the Actuator with which the sensor operates.
@rtype: string
"""
def setActuator(name):
"""
DEPRECATED: use the actuator property
Sets the Actuator with which to operate. If there is no Actuator
of this name, the function has no effect.
@param name: actuator name
@type name: string
"""