1
0

initial commit

This commit is contained in:
2026-07-26 01:01:08 +02:00
commit 787cefefd5
86 changed files with 3195 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
extends Control
@onready var texture = $texture
@onready var amountLabel = $Label
@onready var progressRect = $progress
@export var imDead := false
var upgradeID := ""
#var amount := 1
var timer := Globals.UPGRADE_TIMERSTART
func _process(delta: float) -> void:
if imDead and not $particles.emitting:
queue_free()
timer -= delta * Engine.time_scale
texture.scale += (Vector2(1, 1) - texture.scale) * 7 * delta
texture.modulate.a += (1 - texture.modulate.a) * 7 * delta
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))
if timer < 0 and not imDead:
Globals.unlockedUpgrades[upgradeID] -= 1
timer = Globals.UPGRADE_TIMERSTART
if Globals.unlockedUpgrades[upgradeID] == 0:
Globals.unlockedUpgrades.erase(upgradeID)
imDead = true
$texture.hide()
$progress.hide()
$Label.hide()
$goldrect.hide()
$breaksfx.play()
$particles.emitting = true