Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 917 Bytes

File metadata and controls

19 lines (11 loc) · 917 Bytes

Provides a set of Python scripts to execute for an Entity.

In Python, all the usual script functions are stored in a pk namespace (e.g. pk.getEntity(id)).

Scripts can use the pk.self global variable to access the Entity they are attached to.

The global layout of the component is very similar to that of the LuaComponent.

Specs

The maximum length of a script name (stored as a putils::string) defaults to 64, and can be adjusted by defining the KENGINE_MAX_PYTHON_SCRIPT_PATH macro.

The maximum number of scripts defaults to 8 and can be adjusted by defining the KENGINE_MAX_PYTHON_SCRIPTS macro.