multiple scenes
This commit is contained in:
parent
e90a7114c6
commit
c05f2c703b
32 changed files with 374 additions and 25 deletions
15
scenes/computer.gd
Normal file
15
scenes/computer.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Control
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_goto_workshop_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
|
||||
1
scenes/computer.gd.uid
Normal file
1
scenes/computer.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cq6xhdlib6c50
|
||||
35
scenes/computer.tscn
Normal file
35
scenes/computer.tscn
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cu2yyw3f2avub"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cq6xhdlib6c50" path="res://scenes/computer.gd" id="1_8pqrt"]
|
||||
[ext_resource type="Texture2D" uid="uid://crdbk8wkw63k0" path="res://assets/computer.png" id="1_om4aa"]
|
||||
|
||||
[node name="Computer" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_8pqrt")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_om4aa")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="GotoWorkshop" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 508.0
|
||||
offset_top = 591.0
|
||||
offset_right = 635.0
|
||||
offset_bottom = 622.0
|
||||
text = "Goto workshop"
|
||||
|
||||
[connection signal="pressed" from="GotoWorkshop" to="." method="_on_goto_workshop_pressed"]
|
||||
143
scenes/ewaste.tscn
Normal file
143
scenes/ewaste.tscn
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://dsfal3m4siap2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c6oycdae5wvjf" path="res://inv_system/inventory.gd" id="1_6uqi0"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj487wauiay6i" path="res://assets/ewase bins.png" id="1_g14j6"]
|
||||
[ext_resource type="Script" uid="uid://dal8g1ce37r3w" path="res://demo_scene.gd" id="1_vbegm"]
|
||||
[ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="2_ehkex"]
|
||||
[ext_resource type="Resource" uid="uid://bepkdyf7dn1y0" path="res://items/hdd_item.tres" id="3_ykrsh"]
|
||||
[ext_resource type="Resource" uid="uid://bcteljob51wfj" path="res://items/battery_item.tres" id="5_00tp4"]
|
||||
[ext_resource type="Resource" uid="uid://c2wbqelme8vy1" path="res://items/ram_item.tres" id="5_g14j6"]
|
||||
[ext_resource type="Resource" uid="uid://88v5bcyrgpob" path="res://items/large_psu_item.tres" id="6_77dp3"]
|
||||
[ext_resource type="Resource" uid="uid://swd1m0hvep4c" path="res://items/small_psu_item.tres" id="7_5tkv4"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="7_xersf"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_00tp4"]
|
||||
font_color = Color(1, 0, 0, 0.5764706)
|
||||
|
||||
[node name="Control" type="Control" node_paths=PackedStringArray("bin_inventory", "loot_button")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_vbegm")
|
||||
bin_inventory = NodePath("BinPanel")
|
||||
loot_button = NodePath("LootButton")
|
||||
loot_pool = Array[ExtResource("2_ehkex")]([ExtResource("3_ykrsh"), ExtResource("5_g14j6"), ExtResource("5_00tp4"), ExtResource("6_77dp3"), ExtResource("7_5tkv4")])
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
z_index = -3
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_g14j6")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="BinPanel" type="PanelContainer" parent="." node_paths=PackedStringArray("grid", "inv_label")]
|
||||
z_index = 2
|
||||
layout_mode = 0
|
||||
offset_left = 714.0
|
||||
offset_top = 386.0
|
||||
offset_right = 1066.0
|
||||
offset_bottom = 587.0
|
||||
script = ExtResource("1_6uqi0")
|
||||
inventory_name = "E-waste Recycling Bin"
|
||||
grid = NodePath("MarginContainer/VBoxContainer/ScrollContainer/GridContainer")
|
||||
inv_label = NodePath("MarginContainer/VBoxContainer/Label")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="BinPanel"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 5
|
||||
theme_override_constants/margin_top = 5
|
||||
theme_override_constants/margin_right = 5
|
||||
theme_override_constants/margin_bottom = 5
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="BinPanel/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="BinPanel/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Inventory 1"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="BinPanel/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
columns = 5
|
||||
|
||||
[node name="ItemSlot12" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot13" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot14" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot15" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot16" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot17" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot18" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot19" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot20" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ItemSlot21" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label2" type="Label" parent="BinPanel/MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "(Items left here will be destroyed)"
|
||||
label_settings = SubResource("LabelSettings_00tp4")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="LootButton" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -74.0
|
||||
offset_top = -15.5
|
||||
offset_right = 74.0
|
||||
offset_bottom = 15.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "Loot E-waste bins!"
|
||||
|
||||
[node name="ReturnButton" type="Button" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -81.0
|
||||
offset_top = -31.0
|
||||
offset_right = 81.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
text = "Return to workshop"
|
||||
|
||||
[connection signal="pressed" from="LootButton" to="." method="_on_loot_button_pressed"]
|
||||
[connection signal="pressed" from="ReturnButton" to="." method="_on_return_button_pressed"]
|
||||
19
scenes/workshop.gd
Normal file
19
scenes/workshop.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Control
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_goto_ewaste_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/ewaste.tscn")
|
||||
|
||||
|
||||
func _on_goto_computer_pressed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/computer.tscn")
|
||||
1
scenes/workshop.gd.uid
Normal file
1
scenes/workshop.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bla0gy2tlqwe1
|
||||
52
scenes/workshop.tscn
Normal file
52
scenes/workshop.tscn
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dbxymsdyvbe2p"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dhyryjblax7sj" path="res://assets/workshop.png" id="1_d7fqo"]
|
||||
[ext_resource type="Script" uid="uid://bla0gy2tlqwe1" path="res://scenes/workshop.gd" id="1_g1tdj"]
|
||||
[ext_resource type="PackedScene" uid="uid://f06ym5ujhdsc" path="res://inv_system/crafting_panel.tscn" id="2_wwo6w"]
|
||||
|
||||
[node name="Workshop" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_g1tdj")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("1_d7fqo")
|
||||
expand_mode = 3
|
||||
|
||||
[node name="GotoEwaste" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 611.0
|
||||
offset_top = 469.0
|
||||
offset_right = 757.0
|
||||
offset_bottom = 500.0
|
||||
text = "Go to ewaste bins"
|
||||
|
||||
[node name="GotoComputer" type="Button" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 614.0
|
||||
offset_top = 522.0
|
||||
offset_right = 760.0
|
||||
offset_bottom = 553.0
|
||||
text = "Go to computer"
|
||||
|
||||
[node name="CraftingPanel" parent="." instance=ExtResource("2_wwo6w")]
|
||||
layout_mode = 0
|
||||
offset_left = 874.0
|
||||
offset_top = 149.0
|
||||
offset_right = 1087.0
|
||||
offset_bottom = 442.0
|
||||
|
||||
[connection signal="pressed" from="GotoEwaste" to="." method="_on_goto_ewaste_pressed"]
|
||||
[connection signal="pressed" from="GotoComputer" to="." method="_on_goto_computer_pressed"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue