Skip to content
On this page

Module: features/upgrades/upgrade

Components

Interfaces

Type Aliases

GenericUpgrade

Ƭ GenericUpgrade: Replace<Upgrade<UpgradeOptions>, { canPurchase: ProcessedComputable<boolean> ; visibility: ProcessedComputable<Visibility> }>

Defined in

profectus/src/features/upgrades/upgrade.ts:73


Upgrade

Ƭ Upgrade<T>: Replace<T & BaseUpgrade, { canAfford: GetComputableTypeWithDefault<T["canAfford"], Ref<boolean>> ; classes: GetComputableType<T["classes"]> ; cost: GetComputableType<T["cost"]> ; display: GetComputableType<T["display"]> ; mark: GetComputableType<T["mark"]> ; style: GetComputableType<T["style"]> ; visibility: GetComputableTypeWithDefault<T["visibility"], Visible> }>

Type parameters

NameType
Textends UpgradeOptions

Defined in

profectus/src/features/upgrades/upgrade.ts:60

Variables

UpgradeType

Const UpgradeType: typeof UpgradeType

Defined in

profectus/src/features/upgrades/upgrade.ts:29

Functions

createUpgrade

createUpgrade<T>(optionsFunc): Upgrade<T>

Type parameters

NameType
Textends UpgradeOptions

Parameters

NameType
optionsFuncOptionsFunc<T, BaseUpgrade, GenericUpgrade>

Returns

Upgrade<T>


setupAutoPurchase

setupAutoPurchase(layer, autoActive, upgrades?): void

Parameters

NameTypeDefault value
layerGenericLayerundefined
autoActiveComputable<boolean>undefined
upgradesGenericUpgrade[][]

Returns

void