Skip to content

Instantly share code, notes, and snippets.

@Core-commits
Created July 16, 2020 09:27
Show Gist options
  • Save Core-commits/f5928c94ab895dfbc265eadb6da659dd to your computer and use it in GitHub Desktop.
Save Core-commits/f5928c94ab895dfbc265eadb6da659dd to your computer and use it in GitHub Desktop.
world.bricks.forEach(async (brick) => { // Finds all brick possible in the map.
if (brick.name == "Kill") { // Is the specific brick currently on named "Kill"?
brick.touching(debounce((p) => {
p.kill();
}), 500)
}
})
Copy link

ghost commented Jul 16, 2020

Async isn't necessary.

@Core-commits
Copy link
Author

aight

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment