moved py controller functions from SCA_PythonController to SCA_IController - the base controller class so python can get the sensors & actuators from any controller (not just SCA_PythonController types)
also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes. an example of getting every sensor connected to an object. all_sensors = [s for c in ob.controllers for s in c.sensors]
This commit is contained in:
@@ -59,7 +59,7 @@ Documentation for the GameLogic Module.
|
||||
actuator = co.getActuator("actuatorname")
|
||||
|
||||
# Activate an actuator
|
||||
GameLogic.addActiveActuator(actuator, True)
|
||||
controller.activate(actuator)
|
||||
|
||||
See the actuator's reference for available methods:
|
||||
- L{2DFilterActuator<SCA_2DFilterActuator.SCA_2DFilterActuator>}
|
||||
@@ -307,6 +307,8 @@ KX_SCENE_RESUME: See L{KX_SceneActuator}
|
||||
@var VIEWMATRIX_INVERSE:
|
||||
@var VIEWMATRIX_INVERSETRANSPOSE:
|
||||
@var VIEWMATRIX_TRANSPOSE:
|
||||
|
||||
@group Deprecated: addActiveActuator
|
||||
"""
|
||||
|
||||
# TODO
|
||||
@@ -335,7 +337,7 @@ def getSceneList():
|
||||
"""
|
||||
def addActiveActuator(actuator, activate):
|
||||
"""
|
||||
Activates the given actuator.
|
||||
Activates the given actuator. (B{deprecated})
|
||||
|
||||
@type actuator: L{SCA_IActuator} or the actuator name as a string.
|
||||
@type activate: boolean
|
||||
|
Reference in New Issue
Block a user