Noah Petherbridge
65a811db0d
* Discovered a bug where if you hit the Undo key to erase pixels and an entire chunk became empty by it, the chunk would have rendering errors and show as a solid black square instead of the level wallpaper showing through. * Chunks that have no pixels in them are culled from the chunker immediately when you call a Delete() operation. * The level file saver also calls a maintenance function to prune all empty chunks upon saving the file. So existing levels with broken chunks need only be re-saved to fix them.
16 lines
238 B
JavaScript
16 lines
238 B
JavaScript
// Exit Flag.
|
|
function main() {
|
|
console.log("%s initialized!", Self.Doodad.Title);
|
|
Self.SetHitbox(22+16, 16, 75-16, 86);
|
|
|
|
Events.OnCollide(function(e) {
|
|
if (!e.Settled) {
|
|
return;
|
|
}
|
|
|
|
if (e.InHitbox) {
|
|
EndLevel();
|
|
}
|
|
});
|
|
}
|