Fix ParallaxBackground breaking when moving it out the scene tree

This commit is contained in:
Colin Redman 2019-05-04 10:08:49 -07:00
parent 84401e8cdf
commit 359d7f178c

View file

@ -105,6 +105,11 @@ void ParallaxLayer::_notification(int p_what) {
orig_scale = get_scale();
_update_mirroring();
} break;
case NOTIFICATION_EXIT_TREE: {
set_position(orig_offset);
set_scale(orig_scale);
} break;
}
}