Built-in doodads and levels of Sketchy Maze.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
605 B

// Reset Level Timer.
function main() {
Self.Hide();
// Reset the level timer only once.
let hasReset = false;
Events.OnCollide((e) => {
if (!e.Settled) {
return;
}
// Only care if it's the player.
if (!e.Actor.IsPlayer()) {
return;
}
if (e.InHitbox && !hasReset) {
Level.ResetTimer();
hasReset = true;
}
});
// Receive a power signal resets the doodad.
Message.Subscribe("power", (powered) => {
if (powered) {
hasReset = true;
}
});
}