| 1234567891011121314151617181920212223 |
- #ifndef __COMPONENTS__SCRIPT_COMPONENT_H__
- #define __COMPONENTS__SCRIPT_COMPONENT_H__
- #include <pybind11/pybind11.h>
- #include <string>
- #include <memory>
- namespace py = pybind11;
- struct ScriptComponent
- {
- std::string scriptModule; // e.g. "enemy_ai" (without .py)
- std::string scriptClass; // e.g. "EnemyAI"
-
- py::object instance // Holds the live Python object
- bool initialized = false;
-
- ScriptComponent() = default;
- ScriptComponent(const std::string& moduleName, const std::string& className)
- : scriptModule(moduleName), scriptClass(className) {}
- };
- #endif
|