init
This commit is contained in:
17
scripts/upgrades/upgrade.gd
Normal file
17
scripts/upgrades/upgrade.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
extends Resource
|
||||
class_name Upgrade
|
||||
|
||||
@export var name: String = "Base Upgrade"
|
||||
@export var description: String = "Base Description"
|
||||
@export var unlocks: Array[Upgrade]
|
||||
@export var cost: Dictionary = {
|
||||
"star": 1
|
||||
}
|
||||
@export var purchased: bool = false
|
||||
@export var tier: int = -1
|
||||
|
||||
func activate_upgrade() -> bool:
|
||||
if DataHandler.has_upgrade_cost(self): return false
|
||||
purchased = true
|
||||
DataHandler.game_data.upgrades.append_array(unlocks)
|
||||
return true
|
||||
Reference in New Issue
Block a user