Added hats
This commit is contained in:
1 parent
ca04b528bc
commit
30b2ec013e
6 files changed
+53
-31
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user