Module SCA_PythonController
|
|
1
2
3 from SCA_IController import *
4
6 """
7 A Python controller uses a Python script to activate it's actuators,
8 based on it's sensors.
9 """
10
12 """
13 Gets a list of all sensors attached to this controller.
14
15 @rtype: list [L{SCA_ISensor}]
16 """
18 """
19 Gets the named linked sensor.
20
21 @type name: string
22 @rtype: L{SCA_ISensor}
23 """
25 """
26 Gets a list of all actuators linked to this controller.
27
28 @rtype: list [L{SCA_IActuator}]
29 """
31 """
32 Gets the named linked actuator.
33
34 @type name: string
35 @rtype: L{SCA_IActuator}
36 """
38 """
39 Gets the Python script this controller executes.
40
41 @rtype: string
42 """
44 """
45 Sets the Python script this controller executes.
46
47 @type script: string.
48 """
50 """
51 Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active.
52 This for instance will always be true however you could compare with a previous state to see when the state was activated.
53 GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState()
54
55 @rtype: int
56 """
57