doodle/pkg/doodads
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
..
dummy Collision: Fix walking up leftward slopes 2021-06-02 21:49:29 -07:00
actor.go Overhaul the Platformer Physics System 2020-04-04 21:00:32 -07:00
doodad.go First-class Doodad Hitboxes + Generic Item Script 2021-09-03 20:39:44 -07:00
drawing.go Link Start Flags to Change Characters 2021-08-11 20:40:31 -07:00
dummy.go Change types int32 -> int per upstream render and ui library 2019-12-27 19:16:34 -08:00
fmt_gzip.go Gzip Compression for Levels and Doodads 2021-07-13 20:06:57 -07:00
fmt_readwrite.go Gzip Compression for Levels and Doodads 2021-07-13 20:06:57 -07:00
json.go Sort levels and doodads in the Open menu 2021-08-15 20:27:05 -07:00
sort.go New TabFrame Widget for Doodads and Settings 2021-07-25 21:46:55 -07:00