Game. Upgrade

new Upgrade(name, desc, price, icon, hide, buyFunctionnullable)

Upgrade class

Parameters:
NameTypeAttributesDescription
namestring

Name of Upgrade

descstring

Description of Upgrade

pricenumber

Price of Upgrade

iconstring

Path to icon image

hidenumber

0=show, 3=hide (1-2 : I have no idea)

buyFunctionfunction<nullable>

Custom buy function

Methods

UpdateLocale() → {void}

Updates localization for Upgrade

Returns:
Type: 
void

buy() → {void}

Buies the Upgrade

Returns:
Type: 
void

getPrice() → {number}

Returns price of Upgrade

Returns:
Type: 
number

toggle() → {void}

Cheating only

Returns:
Type: 
void