Noah Petherbridge
a73dec9f31
* 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.
14 lines
206 B
JavaScript
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);
|
|
});
|
|
}
|