Cookie Clicker

Cat Clicker by danielRift (itch.io)

This is a simple function that adds one to the counter number each time the button is clicked.

A coroutine runs the code at a time interval, the time for the coroutine changes during this so that when the player buys upgrades to their autoclick it clicks more frequently with each upgrade.

Purchase upgrade checks if the player has enough clicks to buy the upgrade and if they do it subtracts the cost from the main counter then increases the cost of the next upgrade. The on mouse enter and exit makes the description pop up when the mouse hovers over the upgrade button. The click power is increased when the per click upgrade is purchased.

Leave a comment

Your email address will not be published. Required fields are marked *