doodle/dev-assets/doodads/doors/locked-door.js
Noah Petherbridge a73dec9f31 Doodad Animations Managed In-Engine
* Add animation support for Doodad actors (Play Mode) into the core
  engine, so that the Doodad script can register named animations and
  play them without managing all the details themselves.
  * Doodad API functions on Self: AddAnimation, PlayAnimation,
    StopAnimation, IsAnimating
* CLI: the `doodad convert` command will name each layer after the
  filename used as the input image.
* CLI: fix the `doodad convert` command creating duplicate Palette
  colors when converting a series of input images into a Doodad.
2019-05-06 15:30:43 -07:00

14 lines
206 B
JavaScript

function main() {
Self.AddAnimation("open", 0, [1]);
var unlocked = false;
Events.OnCollide(function(e) {
if (unlocked) {
return;
}
unlocked = true;
Self.PlayAnimation("open", null);
});
}