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.
This commit is contained in:
2008-06-29 21:52:23 +00:00
parent ab7794392e
commit 6a3e8e7fff
7 changed files with 70 additions and 1 deletions

View File

@@ -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 */