fix periodic un-dragging in habit puzzle

This commit is contained in:
2022-07-27 23:22:00 +00:00
parent b54f6ba1c7
commit 34d56acc4a

View File

@@ -18,8 +18,11 @@ class Main extends Sprite
"habits/default.txt";
};
function reloadModel(_) {
t.setModel(new HabitModel(habitFile));
t.model.save();
if (t.draggingSprite == null) {
// TODO don't change camera position and zoom when this happens:
t.setModel(new HabitModel(habitFile));
t.model.save();
}
}
reloadModel(null);
new FlxTimer().start(30, reloadModel, 0);