1
2
3 from SCA_ILogicBrick import *
4
6 """
7 Base class for all sensor logic bricks.
8 """
9
11 """
12 True if this sensor brick is in a positive state.
13 """
14
16 """
17 True if this sensor brick has triggered the current controller.
18 """
19
21 """
22 True if the sensor is in positive pulse mode.
23 """
25 """
26 Sets positive pulse mode.
27
28 @type pulse: boolean
29 @param pulse: If True, will activate positive pulse mode for this sensor.
30 """
32 """
33 The frequency for pulse mode sensors.
34
35 @rtype: integer
36 @return: the pulse frequency in 1/50 sec.
37 """
39 """
40 Sets the frequency for pulse mode sensors.
41
42 @type freq: integer
43 @return: the pulse frequency in 1/50 sec.
44 """
46 """
47 True if the sensor is in negative pulse mode.
48 """
50 """
51 Sets negative pulse mode.
52
53 @type pulse: boolean
54 @param pulse: If True, will activate negative pulse mode for this sensor.
55 """
57 """
58 True if this sensor activates on negative events.
59 """
61 """
62 Sets if this sensor activates on positive or negative events.
63
64 @type invert: boolean
65 @param invert: true if activates on negative events; false if activates on positive events.
66 """
68 """
69 Returns whether this sensor is a level detector or a edge detector.
70 It makes a difference only in case of logic state transition (state actuator).
71 A level detector will immediately generate a pulse, negative or positive
72 depending on the sensor condition, as soon as the state is activated.
73 A edge detector will wait for a state change before generating a pulse.
74
75 @rtype: boolean
76 @return: true if sensor is level sensitive, false if it is edge sensitive
77 """
79 """
80 Set whether to detect level or edge transition when entering a state.
81
82 @param level: Detect level instead of edge? (KX_TRUE, KX_FALSE)
83 @type level: boolean
84 """
86 """
87 Reset sensor internal state, effect depends on the type of sensor and settings.
88
89 The sensor is put in its initial state as if it was just activated.
90 """
91