1
0

final commit

This commit is contained in:
2026-07-26 18:54:03 +02:00
parent 4438d9d886
commit c818fba5e9
45 changed files with 1791 additions and 67 deletions
+15 -7
View File
@@ -7,14 +7,21 @@ extends Control
@export var imDead := false
var upgradeID := ""
#var amount := 1
var timer := Globals.UPGRADE_TIMERSTART
var amount := 1
var timer = Globals.UPGRADE_TIMERSTART * pow(1.5, Globals.unlockedUpgrades.get("stopwatch", 0))
var goldUpgrade := false
func _ready():
if goldUpgrade:
progressRect.hide()
$goldrect.show()
timer = 999
func _process(delta: float) -> void:
if imDead and not $particles.emitting:
queue_free()
timer -= delta * Engine.time_scale
if not goldUpgrade: timer -= delta * Engine.time_scale
texture.scale += (Vector2(1, 1) - texture.scale) * 7 * delta
texture.modulate.a += (1 - texture.modulate.a) * 7 * delta
@@ -22,13 +29,14 @@ func _process(delta: float) -> void:
progressRect.position.x += (timer / Globals.UPGRADE_TIMERSTART * 48 - progressRect.position.x) * 5 * delta
progressRect.size.x += (48 - timer / Globals.UPGRADE_TIMERSTART * 48 - progressRect.size.x) * 5 * delta
amountLabel.text = str("x", Globals.unlockedUpgrades.get(upgradeID, -1))
amountLabel.text = str("x", amount)#Globals.unlockedUpgrades.get(upgradeID, -1))
if timer < 0 and not imDead:
amount -= 1
Globals.unlockedUpgrades[upgradeID] -= 1
timer = Globals.UPGRADE_TIMERSTART
if Globals.unlockedUpgrades[upgradeID] == 0:
Globals.unlockedUpgrades.erase(upgradeID)
if amount == 0:
#Globals.unlockedUpgrades.erase(upgradeID)
imDead = true
$texture.hide()
$progress.hide()