Game. Object#

new Object(name, commonName, desc, pic, icon, background, price, cps, drawFunctionnullable, buyFunctionnullable)#

Constructor of Object class

Parameters:
NameTypeAttributesDescription
namestring

Name of object

commonNamestring

Single|Plural|ActiomName

descstring

Description of object

picstring | function

Path to picture or function that provides it

iconstring

Path to building icon image

backgroundstring

Path to background image

pricenumber

Price of Object

cpsnumber

CPS that Object Provides

drawFunctionfunction<nullable>

Custom draw callback

buyFunctionfunction<nullable>

Custom buy function

Methods#

UpdateLocale() → {void}#

Update localization for this object

Returns:
Type: 
void

buy() → {void}#

Buies the Object

Returns:
Type: 
void

refresh() → {void}#

Refreshes the Object

Returns:
Type: 
void

sell() → {void}#

Sells the Object

Returns:
Type: 
void

tooltip() → {string}#

Gets tooltip for this object

Returns:
Type: 
string