Editor: Doodad Properties Window

The Doodad Properties window brings many features that used to be
available only in the `doodad` CLI tool into the Doodad Editor.

* In the Doodad Editor there is a new menubar item: "Doodad" which
  corresponds to the "Level" menu when you're editing a level.
* The "Doodad" menu has two items:
  - "Doodad Properties" (NEW)
  - "Layers" (moved here from the Tools menu)
* The Doodad Properties window lets you edit the Title and Author values
  of the doodad, as well as modify its Tags and manage its Script.
* Its script can be attached (browse for .js file on disk), its existing
  script saved back to disk (dev shell prompt) or deleted altogether
  from the doodad.
* You can create, modify, and delete Tags on the doodad.

Other changes:

* In the Level Editor, the "Level->Page Settings" menu is renamed to
  "Level->Level Properties" to match with "Doodad->Doodad Properties"
  and the pop-up window is retitled accordingly.
* The Exit Flag only exits if the Player touches it - not just any
  mobile doodad!
master
Noah 2021-09-02 21:26:55 -07:00
parent 5de48b13f5
commit 33f2dca5bc
1 changed files with 7 additions and 2 deletions

View File

@ -1,12 +1,17 @@
// Exit Flag.
function main() {
Self.SetHitbox(22+16, 16, 75-16, 86);
Self.SetHitbox(22 + 16, 16, 75 - 16, 86);
Events.OnCollide(function(e) {
Events.OnCollide(function (e) {
if (!e.Settled) {
return;
}
// Only care if it's the player.
if (!e.Actor.IsPlayer()) {
return;
}
if (e.InHitbox) {
EndLevel();
}