f0a14477b24ba9d31a0f5b4d05eb258a687f3189
[blender.git] / source / gameengine / PyDoc / SCA_PropertySensor.py
1 # $Id$
2 # Documentation for SCA_PropertySensor
3 from SCA_ISensor import *
4
5 class SCA_PropertySensor(SCA_ISensor):
6         """
7         Activates when the game object property matches.
8         """
9         
10         def getType():
11                 """
12                 Gets when to activate this sensor.
13                 
14                 KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
15                         KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,
16                         or KX_PROPSENSOR_EXPRESSION.
17                 """
18
19         def setType(checktype):
20                 """
21                 Set the type of check to perform.
22                 
23                 @type checktype: KX_PROPSENSOR_EQUAL, KX_PROPSENSOR_NOTEQUAL,
24                         KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,
25                         or KX_PROPSENSOR_EXPRESSION.
26                 """
27         
28         def getProperty():
29                 """
30                 Return the property with which the sensor operates.
31                 
32                 @rtype string
33                 @return the name of the property this sensor is watching.
34                 """
35         def setProperty(name):
36                 """
37                 Sets the property with which to operate.  If there is no property
38                 of that name, this call is ignored.
39                 
40                 @type name: string.
41                 """
42         def getValue():
43                 """
44                 Return the value with which the sensor compares to the value of the property.
45                 
46                 @rtype string
47                 @return the value of the property this sensor is watching.
48                 """
49         def setValue(value):
50                 """
51                 Set the value with which the sensor operates. If the value
52                 is not compatible with the type of the property, the subsequent
53                 action is ignored.
54                 
55                 @type value: string
56                 """
57