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