created basic building class

started building groups
temp ui placed
#11 #13 #6
This commit is contained in:
2024-02-09 12:16:51 -06:00
parent 33334f03e8
commit 78c4291b6a
10 changed files with 212 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://m0us5xqa3gnk"]
[gd_scene load_steps=13 format=3 uid="uid://m0us5xqa3gnk"]
[ext_resource type="Script" path="res://scripts/world.gd" id="1_yf6q1"]
[ext_resource type="Resource" uid="uid://dr00rd4f42jqe" path="res://data/game_resources/gem_resource.tres" id="2_rn4a2"]
@@ -7,8 +7,21 @@
[ext_resource type="Resource" uid="uid://bpjj0x7jr1k6u" path="res://data/game_resources/carbon_resource.tres" id="3_pq6ic"]
[ext_resource type="Script" path="res://scripts/building_manager.gd" id="4_61js3"]
[ext_resource type="Script" path="res://scripts/resource_manager.gd" id="5_k5643"]
[ext_resource type="Texture2D" uid="uid://n806c03hgaq1" path="res://assets/scifi_tilesheet@2.png" id="5_qhth7"]
[ext_resource type="Script" path="res://scripts/gui.gd" id="6_yuatk"]
[sub_resource type="AtlasTexture" id="AtlasTexture_rchmc"]
atlas = ExtResource("5_qhth7")
region = Rect2(1920, 896, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_4w4ox"]
atlas = ExtResource("5_qhth7")
region = Rect2(2048, 896, 128, 128)
[sub_resource type="AtlasTexture" id="AtlasTexture_2smg6"]
atlas = ExtResource("5_qhth7")
region = Rect2(2176, 896, 128, 128)
[node name="world" type="Node2D"]
script = ExtResource("1_yf6q1")
game_resources = Array[Resource("res://scripts/game_resource.gd")]([ExtResource("2_rn4a2"), ExtResource("3_pq6ic")])
@@ -63,18 +76,82 @@ offset_left = -128.0
offset_bottom = 128.0
grow_horizontal = 0
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/GUI/ResourceContainer"]
[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/GUI/ResourceContainer"]
layout_mode = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/GUI/ResourceContainer/MarginContainer"]
layout_mode = 2
[node name="ResourcesLabel" type="Label" parent="CanvasLayer/GUI/ResourceContainer/VBoxContainer"]
[node name="ResourcesLabel" type="Label" parent="CanvasLayer/GUI/ResourceContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_stretch_ratio = 2.0
text = "Resources:"
horizontal_alignment = 1
[node name="GridContainer" type="GridContainer" parent="CanvasLayer/GUI/ResourceContainer/VBoxContainer"]
[node name="GridContainer" type="GridContainer" parent="CanvasLayer/GUI/ResourceContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
columns = 2
[node name="BottomBar" type="PanelContainer" parent="CanvasLayer/GUI"]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0
[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/GUI/BottomBar"]
custom_minimum_size = Vector2(0, 128)
layout_mode = 2
[node name="BuildContainer" type="GridContainer" parent="CanvasLayer/GUI/BottomBar/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
columns = 2
[node name="TextureButton" type="TextureButton" parent="CanvasLayer/GUI/BottomBar/HBoxContainer/BuildContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture_normal = SubResource("AtlasTexture_rchmc")
ignore_texture_size = true
stretch_mode = 5
[node name="TextureButton2" type="TextureButton" parent="CanvasLayer/GUI/BottomBar/HBoxContainer/BuildContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture_normal = SubResource("AtlasTexture_4w4ox")
ignore_texture_size = true
stretch_mode = 5
[node name="TextureButton3" type="TextureButton" parent="CanvasLayer/GUI/BottomBar/HBoxContainer/BuildContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture_normal = SubResource("AtlasTexture_2smg6")
ignore_texture_size = true
stretch_mode = 5
[node name="DetailsPanel" type="PanelContainer" parent="CanvasLayer/GUI/BottomBar/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 3.0
[node name="Label" type="Label" parent="CanvasLayer/GUI/BottomBar/HBoxContainer/DetailsPanel"]
layout_mode = 2
text = "Item details here:
other info here too"
[node name="Spacer" type="Control" parent="CanvasLayer/GUI/BottomBar/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 2.0
[connection signal="changed_resource" from="ResourceManager" to="CanvasLayer/GUI" method="_on_resource_manager_changed_resource"]
[connection signal="timeout" from="ResourceManager/Timer" to="ResourceManager" method="_on_timer_timeout"]