diff options
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/GameLogic.py | 6 | ||||
-rw-r--r-- | source/gameengine/PyDoc/KX_SceneActuator.py | 2 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_IController.py | 52 | ||||
-rw-r--r-- | source/gameengine/PyDoc/SCA_PythonController.py | 42 |
4 files changed, 60 insertions, 42 deletions
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py index 708dc29f137..d16c00ca272 100644 --- a/source/gameengine/PyDoc/GameLogic.py +++ b/source/gameengine/PyDoc/GameLogic.py @@ -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 diff --git a/source/gameengine/PyDoc/KX_SceneActuator.py b/source/gameengine/PyDoc/KX_SceneActuator.py index 8e806c2c50e..937c94c91e6 100644 --- a/source/gameengine/PyDoc/KX_SceneActuator.py +++ b/source/gameengine/PyDoc/KX_SceneActuator.py @@ -20,7 +20,7 @@ class KX_SceneActuator(SCA_IActuator): @type camera: L{KX_Camera} on read, string or L{KX_Camera} on write @ivar useRestart: Set flag to True to restart the sene @type useRestart: bool - @type mode: The mode of the actuator + @ivar mode: The mode of the actuator @type mode: int from 0 to 5 L{GameLogic.Scene Actuator} """ def setUseRestart(flag): diff --git a/source/gameengine/PyDoc/SCA_IController.py b/source/gameengine/PyDoc/SCA_IController.py index f83e7c97dce..3e6ee45e115 100644 --- a/source/gameengine/PyDoc/SCA_IController.py +++ b/source/gameengine/PyDoc/SCA_IController.py @@ -5,5 +5,57 @@ from SCA_ILogicBrick import * class SCA_IController(SCA_ILogicBrick): """ Base class for all controller logic bricks. + + @ivar state: the controllers state bitmask. + This can be used with the GameObject's state to test if the controller is active. + @type state: int bitmask + @ivar sensors: a list of sensors linked to this controller + - note: the sensors are not necessarily owned by the same object. + - note: when objects are instanced in dupligroups links may be lost from objects outside the dupligroup. + @type sensors: list + @ivar actuators: a list of actuators linked to this controller. + - note: the sensors are not necessarily owned by the same object. + - note: when objects are instanced in dupligroups links may be lost from objects outside the dupligroup. + @type actuators: list + + @group Deprecated: getState, getSensors, getActuators """ + def getState(): + """ + DEPRECATED: use the state property + Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active. + This for instance will always be true however you could compare with a previous state to see when the state was activated. + GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState() + + @rtype: int + """ + def getSensors(): + """ + DEPRECATED: use the sensors property + Gets a list of all sensors attached to this controller. + + @rtype: list [L{SCA_ISensor}] + """ + def getSensor(name): + """ + Gets the named linked sensor. + + @type name: string + @rtype: L{SCA_ISensor} + """ + def getActuators(): + """ + DEPRECATED: use the actuators property + Gets a list of all actuators linked to this controller. + + @rtype: list [L{SCA_IActuator}] + """ + def getActuator(name): + """ + Gets the named linked actuator. + + @type name: string + @rtype: L{SCA_IActuator} + """ +
\ No newline at end of file diff --git a/source/gameengine/PyDoc/SCA_PythonController.py b/source/gameengine/PyDoc/SCA_PythonController.py index 9684b41d481..7b9b6ccd80a 100644 --- a/source/gameengine/PyDoc/SCA_PythonController.py +++ b/source/gameengine/PyDoc/SCA_PythonController.py @@ -11,9 +11,8 @@ class SCA_PythonController(SCA_IController): @ivar script: the Python script this controller executes @type script: string, read-only - @ivar state: the controllers state bitmask. - This can be used with the GameObject's state to test if the controller is active. - @type state: integer + + @group Deprecated: getScript, setScript """ def activate(actuator): """ @@ -25,33 +24,6 @@ class SCA_PythonController(SCA_IController): Deactivates an actuator attached to this controller. @type actuator: actuator or the actuator name as a string """ - - def getSensors(): - """ - Gets a list of all sensors attached to this controller. - - @rtype: list [L{SCA_ISensor}] - """ - def getSensor(name): - """ - Gets the named linked sensor. - - @type name: string - @rtype: L{SCA_ISensor} - """ - def getActuators(): - """ - Gets a list of all actuators linked to this controller. - - @rtype: list [L{SCA_IActuator}] - """ - def getActuator(name): - """ - Gets the named linked actuator. - - @type name: string - @rtype: L{SCA_IActuator} - """ def getScript(): """ DEPRECATED: use the script property @@ -61,17 +33,9 @@ class SCA_PythonController(SCA_IController): """ def setScript(script): """ + DEPRECATED: use the script property Sets the Python script this controller executes. @type script: string. """ - def getState(): - """ - DEPRECATED: use the state property - Get the controllers state bitmask, this can be used with the GameObject's state to test if the the controller is active. - This for instance will always be true however you could compare with a previous state to see when the state was activated. - GameLogic.getCurrentController().getState() & GameLogic.getCurrentController().getOwner().getState() - - @rtype: int - """ |