Restart the level when switching back from the editor

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-09 18:47:18 -06:00
parent 274fa7c3c5
commit ac053d6c1f

View File

@ -1920,7 +1920,9 @@ class Conductor {
this.switch_to_editor();
});
document.querySelector('#editor-play').addEventListener('click', ev => {
// FIXME also restart! but also the player shouldn't start before switching to it anyway
// Restart the level to ensure it takes edits into account
// TODO need to finish thinking out the exact flow between editor/player and what happens when...
this.player.restart_level();
this.switch_to_player();
});