Profectus / features/clickables/upgrade / setupAutoPurchase
Function: setupAutoPurchase() ​
setupAutoPurchase(
layer,autoActive,upgrades):void
Utility to auto purchase a list of upgrades whenever they're affordable.
Parameters ​
layer ​
The layer the upgrades are apart of
autoActive ​
MaybeRefOrGetter<boolean>
Whether or not the upgrades should currently be auto-purchasing
upgrades ​
Upgrade[] = []
The specific upgrades to upgrade. If unspecified, uses all upgrades on the layer.
Returns ​
void