Added hats

This commit is contained in:
Debugman committed 2026-10-18 21:37:11 -05:00
1 parent ca04b528bc
commit 30b2ec013e
6 files changed
+53 -31

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
extends Node2D
@export var hat_type:= "dunce1"
var hat_texture = load("res://art/hats/" + str(hat_type) + ".png")
func _ready() -> void:
pass
func _process(delta: float) -> void:
pass
func on_contact(body: Node2D) -> void:
print("BODY: " + str(body))
%Player2D/HatSound.play()
visible = false
%Player2D/Sprite2D/HatSprite.texture = hat_texture
%Player2D/Sprite2D/HatSprite.show()
await get_tree().create_timer(0.2).timeout
queue_free()