diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-06-30 01:52:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-06-30 01:52:23 +0400 |
commit | 6a3e8e7fff4e577bea02966546293760c19deec7 (patch) | |
tree | 1b5033f3a49fba5443d6413c700862b1e8b17540 /source/gameengine/GameLogic/SCA_PythonController.cpp | |
parent | ab7794392e9708ddbba24d9b444f61c06b19099b (diff) |
BGE python api addition, GameObject get/setState and Controller.getState()
Also added a note in the tooltip for action priority when using more then 1 action at a time.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_PythonController.cpp')
-rw-r--r-- | source/gameengine/GameLogic/SCA_PythonController.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 44cdc0a7de5..be00117cd21 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -232,6 +232,7 @@ PyMethodDef SCA_PythonController::Methods[] = { METH_VARARGS, SCA_PythonController::GetSensor_doc}, {"getScript", (PyCFunction) SCA_PythonController::sPyGetScript, METH_VARARGS}, {"setScript", (PyCFunction) SCA_PythonController::sPySetScript, METH_VARARGS}, + {"getState", (PyCFunction) SCA_PythonController::sPyGetState, METH_VARARGS}, {NULL,NULL} //Sentinel }; @@ -442,4 +443,12 @@ PyObject* SCA_PythonController::PySetScript(PyObject* self, Py_Return; } +/* 1. getScript */ +PyObject* SCA_PythonController::PyGetState(PyObject* self, + PyObject* args, + PyObject* kwds) +{ + return PyInt_FromLong(m_statemask); +} + /* eof */ |