doodle/pkg/uix
Noah Petherbridge 7866f618da First-class Doodad Hitboxes + Generic Item Script
A new property is added to the Doodad struct: Hitbox (Rect).

The uix.Actor for Play Mode will defer to the Doodad.Hitbox until the
JavaScript has manually set its own via Self.SetHitbox(). So in effect,
scripts no longer need to worry about their hitbox! The one assigned to
the Doodad will be the default.

Scripts can check if their hitbox is zero before setting a default:

  if (Self.Hitbox().IsZero()) {
    var size = Self.Size()           // get doodad canvas size
    Self.SetHitbox(0, 0, size, size) // the full square
  }

The built-in generic doodad scripts have made this change, so that your
simple doodad can have a custom hitbox defined easily using in-game
tools.

Other changes:

* New script: Generic Collectible Item. Selecting it will add a
  "quantity" tag to your doodad, to easily configure the script.
* JavaScript API: "Self.Hitbox()" returns your doodad's current hitbox.
  You can check "Self.Hitbox.IsZero()" to check if it's empty.
2021-09-03 20:39:44 -07:00
..
actor_animation.go Overhaul the Platformer Physics System 2020-04-04 21:00:32 -07:00
actor_collision.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00
actor_events.go Doodads: Use Key and Working Warp Doors 2021-01-03 15:19:21 -08:00
actor.go First-class Doodad Hitboxes + Generic Item Script 2021-09-03 20:39:44 -07:00
canvas_actors.go Updater: Better SemVer version checks for updates 2021-07-11 14:09:18 -07:00
canvas_cursor.go Change types int32 -> int per upstream render and ui library 2019-12-27 19:16:34 -08:00
canvas_editable.go Progress on the Zoom In/Out Feature 2021-07-11 21:54:28 -07:00
canvas_link_tool.go Doodads: Use Key and Working Warp Doors 2021-01-03 15:19:21 -08:00
canvas_present.go Shift to scroll slowly + Doodads on Q 2021-07-13 18:04:25 -07:00
canvas_scrolling.go Checkpoint Flag & Retry from Checkpoint 2021-08-15 20:17:53 -07:00
canvas_strokes.go Brush Pattern Textures 2021-06-09 22:36:32 -07:00
canvas_wallpaper.go Stabilize Load Screen by Deferring SDL2 Calls 2021-07-19 17:14:00 -07:00
canvas_zoom.go Zoom In/Out Feature: WorldIndexAt Fixed 2021-07-13 18:04:25 -07:00
canvas.go Thief and Inventory APIs 2021-08-09 22:42:22 -07:00
scripting.go First-class Doodad Hitboxes + Generic Item Script 2021-09-03 20:39:44 -07:00