Profectus / features/clickables/action
features/clickables/action ​
This is a feature that represents something that can be clicked, but with a cooldown. The remaining cooldown is represented by a Bar. Holding down the action will also automatically perform the action once the cooldown completes.
ts
const action = createAction(() => ({
duration: 5,
display: "Do something cool",
onClick() {
// Some action
}
}));