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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user