From 059eaeda2509b981f4f5cfee89fe48c5caaa25f0 Mon Sep 17 00:00:00 2001 From: unfa Date: Fri, 31 Dec 2021 22:54:53 +0100 Subject: [PATCH] Added helper shape to Spawnpoint scene, deleted when the game starts --- Game/Assets/MapComponents/SpawnPoint.gd | 16 ++++++++++++++++ Game/Assets/MapComponents/SpawnPoint.tscn | 19 ++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Game/Assets/MapComponents/SpawnPoint.gd diff --git a/Game/Assets/MapComponents/SpawnPoint.gd b/Game/Assets/MapComponents/SpawnPoint.gd new file mode 100644 index 0000000..cc71985 --- /dev/null +++ b/Game/Assets/MapComponents/SpawnPoint.gd @@ -0,0 +1,16 @@ +extends Position3D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + $MeshInstance3D.queue_free() + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Game/Assets/MapComponents/SpawnPoint.tscn b/Game/Assets/MapComponents/SpawnPoint.tscn index b23aa18..9b6376e 100644 --- a/Game/Assets/MapComponents/SpawnPoint.tscn +++ b/Game/Assets/MapComponents/SpawnPoint.tscn @@ -1,3 +1,20 @@ -[gd_scene format=3 uid="uid://n3ktc2gomi2p"] +[gd_scene load_steps=4 format=3 uid="uid://n3ktc2gomi2p"] + +[ext_resource type="Script" path="res://Assets/MapComponents/SpawnPoint.gd" id="1_gr60o"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_l6d77"] +blend_mode = 1 +shading_mode = 0 +albedo_color = Color(0, 0.360784, 0.74902, 1) + +[sub_resource type="CylinderMesh" id="CylinderMesh_xjekx"] +material = SubResource( "StandardMaterial3D_l6d77" ) +top_radius = 0.0 [node name="SpawnPoint" type="Position3D"] +script = ExtResource( "1_gr60o" ) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0) +mesh = SubResource( "CylinderMesh_xjekx" ) +surface_material_override/0 = null