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
Name | Type |
---|---|
T | extends 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
Name | Type |
---|---|
T | extends UpgradeOptions |
Parameters
Name | Type |
---|---|
optionsFunc | OptionsFunc <T , BaseUpgrade , GenericUpgrade > |
Returns
Upgrade
<T
>
setupAutoPurchase
▸ setupAutoPurchase(layer
, autoActive
, upgrades?
): void
Parameters
Name | Type | Default value |
---|---|---|
layer | GenericLayer | undefined |
autoActive | Computable <boolean > | undefined |
upgrades | GenericUpgrade [] | [] |
Returns
void