Skip to content

Commit

Permalink
refactor(main): use kaboom global
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jan 15, 2024
1 parent 58309a6 commit f80964b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import "kaboom/global"

import kaboom from "kaboom"

const k = kaboom()
import bean from "/sprites/bean.png"

kaboom()

k.loadSprite("bean", "sprites/bean.png")
loadSprite("bean", bean)

k.add([k.pos(120, 80), k.sprite("bean")])
add([pos(120, 80), sprite("bean")])

k.onClick(() => k.addKaboom(k.mousePos()))
onClick(() => addKaboom(mousePos()))

0 comments on commit f80964b

Please sign in to comment.