diff options
Diffstat (limited to 'source/gameengine/PyDoc/KX_TouchSensor.py')
-rw-r--r-- | source/gameengine/PyDoc/KX_TouchSensor.py | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/source/gameengine/PyDoc/KX_TouchSensor.py b/source/gameengine/PyDoc/KX_TouchSensor.py index f2cc101af10..d7277be4c2a 100644 --- a/source/gameengine/PyDoc/KX_TouchSensor.py +++ b/source/gameengine/PyDoc/KX_TouchSensor.py @@ -1,36 +1,55 @@ # $Id$ # Documentation for KX_TouchSensor from SCA_ISensor import * +from KX_GameObject import * class KX_TouchSensor(SCA_ISensor): """ Touch sensor detects collisions between objects. + + @ivar property: The property or material to collide with. + @type property: string + @ivar useMaterial: Determines if the sensor is looking for a property or material. + KX_True = Find material; KX_False = Find property + @type useMaterial: boolean + @ivar pulseCollisions: The last collided object. + @type pulseCollisions: bool + @ivar objectHit: The last collided object. (Read Only) + @type objectHit: L{KX_GameObject} or None + @ivar objectHitList: A list of colliding objects. (Read Only) + @type objectHitList: list """ + + #--The following methods are deprecated, please use properties instead. def setProperty(name): """ + DEPRECATED: use the property property Set the property or material to collide with. Use setTouchMaterial() to switch between properties and materials. @type name: string """ + def getProperty(): """ + DEPRECATED: use the property property Returns the property or material to collide with. Use getTouchMaterial() to find out whether this sensor - looks for properties or materials. + looks for properties or materials. (B{deprecated}) @rtype: string """ - def getHitObject(): """ - Returns the last object hit by this touch sensor. + DEPRECATED: use the objectHit property + Returns the last object hit by this touch sensor. (B{deprecated}) @rtype: L{KX_GameObject} """ def getHitObjectList(): """ - Returns a list of all objects hit in the last frame. + DEPRECATED: use the objectHitList property + Returns a list of all objects hit in the last frame. (B{deprecated}) Only objects that have the requisite material/property are listed. @@ -38,13 +57,7 @@ class KX_TouchSensor(SCA_ISensor): """ def getTouchMaterial(): """ + DEPRECATED: use the useMaterial property Returns KX_TRUE if this sensor looks for a specific material, - KX_FALSE if it looks for a specific property. - """ - def setTouchMaterial(flag): - """ - Set flag to KX_TRUE to switch on positive pulse mode, - KX_FALSE to switch off positive pulse mode. - - @type flag: KX_TRUE or KX_FALSE. + KX_FALSE if it looks for a specific property. (B{deprecated}) """ |