Reset state of SkeletonModification2D when loaded from cache

This commit is contained in:
johnsonbaugh 2024-04-23 21:29:59 -07:00
parent ef8acbde9a
commit e2995d3b88
2 changed files with 7 additions and 0 deletions

View File

@ -233,6 +233,11 @@ void SkeletonModification2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "execution_mode", PROPERTY_HINT_ENUM, "process,physics_process"), "set_execution_mode", "get_execution_mode");
}
void SkeletonModification2D::reset_state() {
stack = nullptr;
is_setup = false;
}
SkeletonModification2D::SkeletonModification2D() {
stack = nullptr;
is_setup = false;

View File

@ -57,6 +57,8 @@ protected:
bool _print_execution_error(bool p_condition, String p_message);
virtual void reset_state() override;
GDVIRTUAL1(_execute, double)
GDVIRTUAL1(_setup_modification, Ref<SkeletonModificationStack2D>)
GDVIRTUAL0(_draw_editor_gizmo)