@@ -73,6 +73,8 @@ class PythonModules {
7373 static PyObject* node2D_add_to_position (PyObject* self, PyObject* args, PyObject* kwargs);
7474 static PyObject* node2D_get_rotation (PyObject* self, PyObject* args, PyObject* kwargs);
7575 static PyObject* node2D_set_rotation (PyObject* self, PyObject* args, PyObject* kwargs);
76+ static PyObject* node2D_get_z_index (PyObject* self, PyObject* args, PyObject* kwargs);
77+ static PyObject* node2D_set_z_index (PyObject* self, PyObject* args, PyObject* kwargs);
7678
7779 static PyObject* sprite_get_flip_h (PyObject* self, PyObject* args, PyObject* kwargs);
7880 static PyObject* sprite_set_flip_h (PyObject* self, PyObject* args, PyObject* kwargs);
@@ -403,6 +405,14 @@ static struct PyMethodDef rollApiMethods[] = {
403405 " node2D_set_rotation" , (PyCFunction) PythonModules::node2D_set_rotation,
404406 METH_VARARGS | METH_KEYWORDS, " Sets a node's rotation."
405407 },
408+ {
409+ " node2D_get_z_index" , (PyCFunction) PythonModules::node2D_get_z_index,
410+ METH_VARARGS | METH_KEYWORDS, " Returns a node's z_index."
411+ },
412+ {
413+ " node2D_set_z_index" , (PyCFunction) PythonModules::node2D_set_z_index,
414+ METH_VARARGS | METH_KEYWORDS, " Sets a node's z_index."
415+ },
406416 // SPRITE
407417 {
408418 " sprite_get_flip_h" , (PyCFunction) PythonModules::sprite_get_flip_h,
@@ -739,6 +749,7 @@ static char *timerSetLoopsKWList[] = {"entity_id", "loops", nullptr};
739749
740750static char *node2DUpdatePositionKWList[] = {" entity_id" , " x" , " y" , nullptr };
741751static char *node2DSetRotationKWList[] = {" entity_id" , " rotation" , nullptr };
752+ static char *node2DSetZIndexKWList[] = {" entity_id" , " z_index" , nullptr };
742753
743754static char *spriteSetSpriteFlipHKWList[] = {" entity_id" , " flip_h" , nullptr };
744755static char *spriteSetSpriteFlipVKWList[] = {" entity_id" , " flip_v" , nullptr };
0 commit comments