added the game

This commit is contained in:
JHDev2006
2025-09-13 16:30:32 +01:00
parent 5ef689109b
commit 3773bdaf64
3616 changed files with 263702 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
class_name KeyItem
extends Node2D
static var total_collected := 0
const SMOKE_PARTICLE = preload("uid://d08nv4qtfouv1")
func _ready() -> void:
$AnimationPlayer.play("Float")
func collected() -> void:
total_collected += 1
AudioManager.play_sfx("key_collect", global_position)
summon_smoke_particle()
queue_free()
func summon_smoke_particle() -> void:
var node = SMOKE_PARTICLE.instantiate()
node.global_position = global_position
add_sibling(node)