Can now select grid node with mouse click
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://main/building_layout_editor.gd" type="Script" id=1]
|
||||
[ext_resource path="res://astream/building-layouts/building-elements.glb" type="PackedScene" id=2]
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=4]
|
||||
flags_transparent = true
|
||||
albedo_color = Color( 1, 1, 1, 0.654902 )
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
material = SubResource( 4 )
|
||||
size = Vector3( 40, 1, 40 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=2]
|
||||
flags_transparent = true
|
||||
flags_unshaded = true
|
||||
@@ -20,6 +12,17 @@ albedo_color = Color( 0.745098, 0.105882, 0.105882, 0.192157 )
|
||||
material = SubResource( 2 )
|
||||
size = Vector3( 4, 8, 4 )
|
||||
|
||||
[sub_resource type="SpatialMaterial" id=4]
|
||||
flags_transparent = true
|
||||
albedo_color = Color( 1, 1, 1, 0.654902 )
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
material = SubResource( 4 )
|
||||
size = Vector3( 40, 1, 40 )
|
||||
|
||||
[sub_resource type="BoxShape" id=5]
|
||||
extents = Vector3( 20, 1, 20 )
|
||||
|
||||
[node name="building_layout_editor" type="Spatial"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
@@ -60,16 +63,14 @@ focus_mode = 2
|
||||
text = "Interior"
|
||||
switch_on_hover = true
|
||||
|
||||
[node name="bg_floor" type="MeshInstance" parent="."]
|
||||
[node name="bg_floor" type="Spatial" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0 )
|
||||
mesh = SubResource( 1 )
|
||||
|
||||
[node name="DirectionalLight" type="DirectionalLight" parent="."]
|
||||
transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 100, 0 )
|
||||
|
||||
[node name="Camera" type="Camera" parent="."]
|
||||
transform = Transform( 0.707107, 0.5, -0.5, 0, 0.707107, 0.707107, 0.707107, -0.5, 0.5, -25, 25, 25 )
|
||||
transform = Transform( 0.707107, 0.5, -0.5, 0, 0.707107, 0.707107, 0.707107, -0.5, 0.5, -16, 23, 30 )
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
anchor_left = 1.0
|
||||
@@ -323,6 +324,48 @@ size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
columns = 2
|
||||
|
||||
[node name="layout_editor" type="PanelContainer" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 719.0
|
||||
margin_right = 314.0
|
||||
margin_bottom = 847.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/layout_editor"]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 307.0
|
||||
margin_bottom = 121.0
|
||||
|
||||
[node name="grid_elements" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_right = 300.0
|
||||
margin_bottom = 20.0
|
||||
|
||||
[node name="clear_grid_cell" type="Button" parent="VBoxContainer/layout_editor/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 24.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 44.0
|
||||
text = "Clear cell"
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/layout_editor/VBoxContainer"]
|
||||
margin_top = 48.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 62.0
|
||||
text = "Level"
|
||||
|
||||
[node name="level_value" type="SpinBox" parent="VBoxContainer/layout_editor/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 66.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 90.0
|
||||
|
||||
[node name="layout_selector" type="OptionButton" parent="VBoxContainer/layout_editor/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
margin_top = 94.0
|
||||
margin_right = 300.0
|
||||
margin_bottom = 114.0
|
||||
|
||||
[node name="BuildingLayoutEditor" type="BuildingLayoutEditor" parent="."]
|
||||
source = ExtResource( 2 )
|
||||
|
||||
@@ -333,3 +376,23 @@ unique_name_in_owner = true
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 4, -2 )
|
||||
mesh = SubResource( 3 )
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="RemoteTransform" type="RemoteTransform" parent="."]
|
||||
remote_path = NodePath("../bg_floor")
|
||||
update_rotation = false
|
||||
update_scale = false
|
||||
|
||||
[node name="bg_floor_base" type="MeshInstance" parent="RemoteTransform"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, -0.5, -2 )
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("../..")
|
||||
|
||||
[node name="Area" type="Area" parent="RemoteTransform/bg_floor_base"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 )
|
||||
collision_layer = 49152
|
||||
collision_mask = 49152
|
||||
monitoring = false
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape" parent="RemoteTransform/bg_floor_base/Area"]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 )
|
||||
shape = SubResource( 5 )
|
||||
|
||||
Reference in New Issue
Block a user