diff --git a/Assets/components/spawn_point.tscn b/Assets/components/spawn_point.tscn new file mode 100644 index 0000000..523cf16 --- /dev/null +++ b/Assets/components/spawn_point.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=3 uid="uid://cpwg1ula5qbrl"] + +[ext_resource type="Script" path="res://Assets/scripts/SpawnPoint.gd" id="1_1dk7k"] + +[node name="SpawnPoint" type="Node3D"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.72563, 0.394659, -9.82302) +script = ExtResource("1_1dk7k") diff --git a/Assets/scripts/SpawnPoint.gd b/Assets/scripts/SpawnPoint.gd new file mode 100644 index 0000000..8bc73ad --- /dev/null +++ b/Assets/scripts/SpawnPoint.gd @@ -0,0 +1,7 @@ +extends Node3D + + +# Called when the node enters the scene tree for the first time. +func _ready(): + GlobalSettings.SetSpawnPoint(self.global_position) + get_tree().call_group("Player", "respawn")