doodads/dev-assets/doodads/buttons
Noah 13d40423cc Improve OnCollide Doodad Script Handling
* Events.OnCollide now receives a CollideEvent object, which makes
  available the .Actor who collided and the .Overlap rect which is
  zero-relative to the target actor. Doodad scripts can use the .Overlap
  to see WHERE in their own box the other actor has intruded.
  * Update the LockedDoor and ElectricDoor doodads to detect when the
    player has entered their inner rect (since their doors are narrower
    than their doodad size)
  * Update the Button doodads to only press in when the player actually
    touches them (because their sizes are shorter than their doodad
    height)
  * Update the Trapdoor to only trigger its animation when the board
    along its top has been touched, not when the empty space below was
    touched from the bottom.
* Events.OnLeave now implemented and fires when an actor who was
  previously intersecting your doodad has left.
* The engine detects when an event JS callback returns false.
  Eventually, the OnCollide can return false to signify the collision is
  not accepted and the actor should be bumped away as if they hit solid
  geometry.
2019-05-06 22:58:09 -07:00
..
README.md 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
button.js Improve OnCollide Doodad Script Handling 2019-05-06 22:58:09 -07:00
button1.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
button2.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
sticky.js Improve OnCollide Doodad Script Handling 2019-05-06 22:58:09 -07:00
sticky1.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
sticky2.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
typeB1.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00
typeB2.png 1st Round of Doodad Sprites + Improve Doodad Tool 2019-04-17 00:02:41 -07:00

README.md

Button Doodads

doodad convert -t "Sticky Button" sticky1.png sticky2.png sticky-button.doodad
doodad install-script sticky.js sticky-button.doodad

doodad convert -t "Button" button1.png button2.png button.doodad
doodad install-script button.js button.doodad

doodad convert -t "Button Type B" typeB1.png typeB2.png button-typeB.doodad
doodad install-script button.js button-typeB.doodad