clickercookie / clickercookie.github.io

A totally original game about clicking a cookie
GNU General Public License v3.0
3 stars 0 forks source link

store `currentClicked` items in an object #28

Open FifthTundraG opened 2 weeks ago

FifthTundraG commented 2 weeks ago

Like so:

const currentClickedItems = [
    {
        name: "cookie",
        pluralName: "cookies",
        img: "cookie.png", // if we want to do it automagically (`${name}.png`) then we can, but there's no harm in using this. maybe it can be optional?
        circular: true, // border-radius should be 128px
        pixelated: false // image-rendering auto/pixelated
    }
]
FifthTundraG commented 2 weeks ago

Data stored in the currentClickedItems array can be passed into a function called personalization.registerClickableItem() that will setup HTML and such