#include "generator.h" #include "core/config/engine.h" #include "core/object/class_db.h" #include "macros.h" void Generator::_bind_methods() { BIND_HPROPERTY(Variant::OBJECT, state, PROPERTY_HINT_RESOURCE_TYPE, "Sentence"); } void Generator::ready() { } void Generator::_notification(int what) { if (Engine::get_singleton()->is_editor_hint()) { return; } switch (what) { default: return; case NOTIFICATION_READY: ready(); case NOTIFICATION_CHILD_ORDER_CHANGED: for (Variant child : get_children()) { if (Rule * rule{ cast_to(child) }) { this->rule = rule; return; } } return; } }