Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-02-24 08:50:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-24 08:50:45 +0300
commit6c7c38a4e4892677f8e7db2b41115209901a2d35 (patch)
tree837963b7e941b66655903cc65edd05588497b19e /source/gameengine/GameLogic/SCA_PythonController.h
parent394d893e13257cb0fc5bec815e2111c12d5ed4ec (diff)
BGE Py API
* Made GameLogic.addActiveActuator(actu, bool) to raise an error if the actuator is not in the list. Before it would allow any value as the actuator and fail silently (makes debugging scripts more difficult). * Allow the actuator to be a string which is convenient if you dont want to change the settings of the actuator. * Added activate/deactivate functions to the controller, this is more logical since the GameLogic.addActiveActuator() function is running through the controller anyway. GameLogic.addActiveActuator(controller.getActuator("SomeAct"), True) ...can be replaced with... controller.activate("SomeAct")
Diffstat (limited to 'source/gameengine/GameLogic/SCA_PythonController.h')
-rw-r--r--source/gameengine/GameLogic/SCA_PythonController.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.h b/source/gameengine/GameLogic/SCA_PythonController.h
index 046ef1f7aed..4ec18f32c23 100644
--- a/source/gameengine/GameLogic/SCA_PythonController.h
+++ b/source/gameengine/GameLogic/SCA_PythonController.h
@@ -77,9 +77,13 @@ class SCA_PythonController : public SCA_IController
static const char* sPyAddActiveActuator__doc__;
static PyObject* sPyAddActiveActuator(PyObject* self,
PyObject* args);
+ static SCA_IActuator* LinkedActuatorFromPy(PyObject *value);
virtual PyObject* _getattr(const char *attr);
virtual int _setattr(const char *attr, PyObject *value);
+
+ KX_PYMETHOD_O(SCA_PythonController,Activate);
+ KX_PYMETHOD_O(SCA_PythonController,DeActivate);
KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetSensors);
KX_PYMETHOD_DOC_NOARGS(SCA_PythonController,GetActuators);
KX_PYMETHOD_DOC_O(SCA_PythonController,GetSensor);