diff --git a/game/props/teleporters/dungeon/simple_dungeon_back_teleporter.tscn b/game/props/teleporters/dungeon/simple_dungeon_back_teleporter.tscn new file mode 100644 index 00000000..28ef8a8a --- /dev/null +++ b/game/props/teleporters/dungeon/simple_dungeon_back_teleporter.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://scripts/dungeons/teleporters/dung_back_teleporter.gd" type="Script" id=1] +[ext_resource path="res://textures/test_brick_albedo.png" type="Texture" id=2] + +[sub_resource type="CubeMesh" id=1] +size = Vector3( 1, 1, 1 ) + +[sub_resource type="SpatialMaterial" id=2] +flags_vertex_lighting = true +albedo_color = Color( 0.494118, 0.494118, 0.494118, 1 ) +albedo_texture = ExtResource( 2 ) + +[sub_resource type="BoxShape" id=3] +extents = Vector3( 0.5, 0.5, 0.5 ) + +[node name="DungeonBackTeleporter" type="StaticBody"] +script = ExtResource( 1 ) + +[node name="MeshInstance" type="MeshInstance" parent="."] +mesh = SubResource( 1 ) +material/0 = SubResource( 2 ) + +[node name="CollisionShape" type="CollisionShape" parent="."] +shape = SubResource( 3 ) diff --git a/game/props/teleporters/dungeon/simple_dungeon_teleporter.tscn b/game/props/teleporters/dungeon/simple_dungeon_teleporter.tscn new file mode 100644 index 00000000..f8ed915a --- /dev/null +++ b/game/props/teleporters/dungeon/simple_dungeon_teleporter.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://scripts/dungeons/teleporters/dung_teleporter.gd" type="Script" id=1] +[ext_resource path="res://props/teleporters/dungeon/simple_dungeon_back_teleporter.tscn" type="PackedScene" id=2] +[ext_resource path="res://textures/test_brick_albedo.png" type="Texture" id=4] + +[sub_resource type="CubeMesh" id=1] +size = Vector3( 1, 1, 1 ) + +[sub_resource type="SpatialMaterial" id=2] +flags_vertex_lighting = true +albedo_color = Color( 0.494118, 0.494118, 0.494118, 1 ) +albedo_texture = ExtResource( 4 ) + +[sub_resource type="BoxShape" id=3] +extents = Vector3( 0.5, 0.5, 0.5 ) + +[node name="DungeonTeleporter" type="StaticBody"] +script = ExtResource( 1 ) +default_albedo = Color( 0.521569, 0.521569, 0.521569, 1 ) +dungeon_back_teleporter = ExtResource( 2 ) + +[node name="MeshInstance" type="MeshInstance" parent="."] +mesh = SubResource( 1 ) +material/0 = SubResource( 2 ) + +[node name="CollisionShape" type="CollisionShape" parent="."] +shape = SubResource( 3 ) diff --git a/game/worlds/test_world/dungeons/dung_back_teleporter.tscn b/game/worlds/test_world/dungeons/dung_back_teleporter.tscn index 28ef8a8a..5719e341 100644 --- a/game/worlds/test_world/dungeons/dung_back_teleporter.tscn +++ b/game/worlds/test_world/dungeons/dung_back_teleporter.tscn @@ -1,25 +1,5 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=2 format=2] -[ext_resource path="res://scripts/dungeons/teleporters/dung_back_teleporter.gd" type="Script" id=1] -[ext_resource path="res://textures/test_brick_albedo.png" type="Texture" id=2] +[ext_resource path="res://props/teleporters/dungeon/simple_dungeon_back_teleporter.tscn" type="PackedScene" id=1] -[sub_resource type="CubeMesh" id=1] -size = Vector3( 1, 1, 1 ) - -[sub_resource type="SpatialMaterial" id=2] -flags_vertex_lighting = true -albedo_color = Color( 0.494118, 0.494118, 0.494118, 1 ) -albedo_texture = ExtResource( 2 ) - -[sub_resource type="BoxShape" id=3] -extents = Vector3( 0.5, 0.5, 0.5 ) - -[node name="DungeonBackTeleporter" type="StaticBody"] -script = ExtResource( 1 ) - -[node name="MeshInstance" type="MeshInstance" parent="."] -mesh = SubResource( 1 ) -material/0 = SubResource( 2 ) - -[node name="CollisionShape" type="CollisionShape" parent="."] -shape = SubResource( 3 ) +[node name="DungeonBackTeleporter" instance=ExtResource( 1 )] diff --git a/game/worlds/test_world/dungeons/dung_teleporter.tscn b/game/worlds/test_world/dungeons/dung_teleporter.tscn index f58a7c09..c406ad42 100644 --- a/game/worlds/test_world/dungeons/dung_teleporter.tscn +++ b/game/worlds/test_world/dungeons/dung_teleporter.tscn @@ -1,30 +1,7 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=3 format=2] -[ext_resource path="res://scripts/dungeons/teleporters/dung_teleporter.gd" type="Script" id=1] -[ext_resource path="res://worlds/test_world/dungeons/dung_back_teleporter.tscn" type="PackedScene" id=2] -[ext_resource path="res://tests/test_dungeon/Dungeon.tscn" type="PackedScene" id=3] -[ext_resource path="res://textures/test_brick_albedo.png" type="Texture" id=4] +[ext_resource path="res://props/teleporters/dungeon/simple_dungeon_teleporter.tscn" type="PackedScene" id=1] +[ext_resource path="res://tests/test_dungeon/Dungeon.tscn" type="PackedScene" id=2] -[sub_resource type="CubeMesh" id=1] -size = Vector3( 1, 1, 1 ) - -[sub_resource type="SpatialMaterial" id=2] -flags_vertex_lighting = true -albedo_color = Color( 0.494118, 0.494118, 0.494118, 1 ) -albedo_texture = ExtResource( 4 ) - -[sub_resource type="BoxShape" id=3] -extents = Vector3( 0.5, 0.5, 0.5 ) - -[node name="DungeonTeleporter" type="StaticBody"] -script = ExtResource( 1 ) -default_albedo = Color( 0.521569, 0.521569, 0.521569, 1 ) -dungeon = ExtResource( 3 ) -dungeon_back_teleporter = ExtResource( 2 ) - -[node name="MeshInstance" type="MeshInstance" parent="."] -mesh = SubResource( 1 ) -material/0 = SubResource( 2 ) - -[node name="CollisionShape" type="CollisionShape" parent="."] -shape = SubResource( 3 ) +[node name="DungeonTeleporter" instance=ExtResource( 1 )] +dungeon = ExtResource( 2 )