new Object(name, commonName, desc, pic, icon, background, price, cps, drawFunctionnullable, buyFunctionnullable)
Constructor of Object class
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name | string | Name of object | |
commonName | string | Single|Plural|ActiomName | |
desc | string | Description of object | |
pic | string | | Path to picture or function that provides it | |
icon | string | Path to building icon image | |
background | string | Path to background image | |
price | number | Price of Object | |
cps | number | CPS that Object Provides | |
drawFunction | function | <nullable> | Custom draw callback |
buyFunction | function | <nullable> | Custom buy function |
- Source
Methods
UpdateLocale() → {void}
Update localization for this object
- Source
Returns:
- Type:
- void
buy() → {void}
Buies the Object
- Source
Returns:
- Type:
- void
refresh() → {void}
Refreshes the Object
- Source
Returns:
- Type:
- void
sell() → {void}
Sells the Object
- Source
Returns:
- Type:
- void
tooltip() → {string}
Gets tooltip for this object
- Source
Returns:
- Type:
- string