1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-22 07:44:17 +00:00
This commit is contained in:
Matteo Balugani 2023-10-02 21:29:27 +02:00
commit b9ce66a02d
2 changed files with 4 additions and 1 deletions

View file

@ -2,7 +2,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cad2rtfm4iooa" uid="uid://bnfwmlf7ems16"
path="res://.godot/imported/coal.png-bae62eb66a24aa48a4fb6fc311fab196.ctex" path="res://.godot/imported/coal.png-bae62eb66a24aa48a4fb6fc311fab196.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false

View file

@ -92,6 +92,9 @@ func _on_ghost_requested(scene: PackedScene, texture: Texture2D):
func _on_ghost_materialize(): func _on_ghost_materialize():
var instantiated = ghost.materialize() var instantiated = ghost.materialize()
if not instantiated:
print("[Game] The ghost can't materialize; the spawning is cancelled!")
return
var spawner = instantiated.find_child("Spawner") var spawner = instantiated.find_child("Spawner")
if spawner != null: if spawner != null:
spawner.target = self spawner.target = self