système de sauvegarde, scène 3D de test sur la base astra et passage en forward+
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
[gd_scene load_steps=19 format=3 uid="uid://753270jjxmfg"]
|
||||
[gd_scene format=3 uid="uid://753270jjxmfg"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_m317d"]
|
||||
[ext_resource type="Script" uid="uid://b7f10wuounfan" path="res://gui/game/card/scripts/card.gd" id="2_kpm7h"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="2_plgbn"]
|
||||
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="3_7wc8v"]
|
||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="3_kpm7h"]
|
||||
[ext_resource type="Texture2D" uid="uid://bd6qddv5ihkjr" path="res://common/icons/bucket.svg" id="3_pmldi"]
|
||||
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="5_7wc8v"]
|
||||
[ext_resource type="Texture2D" uid="uid://0hbdgalf04e" path="res://common/icons/wood.svg" id="6_7wc8v"]
|
||||
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="6_pmldi"]
|
||||
[ext_resource type="Texture2D" uid="uid://baaujfw8piywi" path="res://common/icons/dna.svg" id="7_mwhj8"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="7_pmldi"]
|
||||
[ext_resource type="Theme" uid="uid://5au2k3vf2po3" path="res://gui/ressources/menu.tres" id="9_7wc8v"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="10_gibok"]
|
||||
[ext_resource type="Texture2D" uid="uid://deywxmh76nu5w" path="res://common/icons/caret-down.svg" id="11_kpm7h"]
|
||||
[ext_resource type="FontFile" uid="uid://3workc27eb0r" path="res://gui/ressources/fonts/Ubuntu/Ubuntu-B.ttf" id="11_pmldi"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gibok"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
@@ -22,24 +23,26 @@ corner_radius_bottom_left = 20
|
||||
[sub_resource type="Resource" id="Resource_plgbn"]
|
||||
script = ExtResource("3_7wc8v")
|
||||
title = "Hello"
|
||||
type_icon = ExtResource("6_7wc8v")
|
||||
texture = ExtResource("7_mwhj8")
|
||||
important_stat_text = "10"
|
||||
important_stat_icon = ExtResource("3_kpm7h")
|
||||
important_stat_text = "8"
|
||||
important_stat_icon = ExtResource("3_pmldi")
|
||||
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnqhg"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="Theme" id="Theme_on5kv"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_sx78e"]
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_gibok"]
|
||||
line_spacing = -24.965
|
||||
font = ExtResource("2_plgbn")
|
||||
font_size = 20
|
||||
font_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_vnqhg"]
|
||||
line_spacing = -18.49
|
||||
font = ExtResource("11_pmldi")
|
||||
font_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_on5kv"]
|
||||
font = ExtResource("2_plgbn")
|
||||
font_size = 40
|
||||
font_color = Color(1, 0.6509804, 0.09019608, 1)
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7wc8v"]
|
||||
resource_name = "expand"
|
||||
@@ -49,10 +52,10 @@ _data = {
|
||||
&"expand": SubResource("Animation_7wc8v")
|
||||
}
|
||||
|
||||
[node name="Card" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(250, 0)
|
||||
[node name="Card" type="PanelContainer" unique_id=1085885349]
|
||||
custom_minimum_size = Vector2(300, 0)
|
||||
offset_right = 250.0
|
||||
offset_bottom = 229.0
|
||||
offset_bottom = 70.0
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
theme = ExtResource("1_m317d")
|
||||
@@ -60,120 +63,84 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_gibok")
|
||||
script = ExtResource("2_kpm7h")
|
||||
info = SubResource("Resource_plgbn")
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="."]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=257784765]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
theme_override_constants/h_separation = 0
|
||||
theme_override_constants/v_separation = 0
|
||||
|
||||
[node name="CardUpperPart" type="PanelContainer" parent="GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
self_modulate = Color(0.13725491, 0.39215687, 0.6666667, 1)
|
||||
clip_contents = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("1_m317d")
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_vnqhg")
|
||||
|
||||
[node name="EntityTexture" type="TextureRect" parent="GridContainer/CardUpperPart"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 1, 1, 0.23137255)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("7_mwhj8")
|
||||
expand_mode = 1
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="GridContainer/CardUpperPart"]
|
||||
layout_mode = 2
|
||||
theme = SubResource("Theme_on5kv")
|
||||
theme_override_constants/margin_left = 25
|
||||
|
||||
[node name="ContentContainer" type="VBoxContainer" parent="GridContainer/CardUpperPart/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="TitleContainer" type="HBoxContainer" parent="GridContainer/CardUpperPart/MarginContainer/ContentContainer"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
|
||||
[node name="CardTitle" type="Label" parent="GridContainer/CardUpperPart/MarginContainer/ContentContainer/TitleContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Hello"
|
||||
label_settings = SubResource("LabelSettings_sx78e")
|
||||
|
||||
[node name="CardTypeIcon" type="TextureRect" parent="GridContainer/CardUpperPart/MarginContainer/ContentContainer/TitleContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
texture = ExtResource("6_7wc8v")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="CardStats" type="MarginContainer" parent="GridContainer/CardUpperPart/MarginContainer/ContentContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
theme_override_constants/margin_left = 0
|
||||
theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 40
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="CardStatsContainer" type="VBoxContainer" parent="GridContainer/CardUpperPart/MarginContainer/ContentContainer/CardStats"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_m317d")
|
||||
theme_override_constants/separation = 6
|
||||
|
||||
[node name="CardSections" type="MarginContainer" parent="GridContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CardSectionsContainer" type="VBoxContainer" parent="GridContainer/CardSections"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ImportantStat" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 0
|
||||
theme_override_constants/margin_top = 30
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="ImportantStat"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
use_top_left = true
|
||||
theme = ExtResource("9_7wc8v")
|
||||
theme_override_constants/margin_left = 12
|
||||
theme_override_constants/margin_top = 12
|
||||
theme_override_constants/margin_right = 12
|
||||
theme_override_constants/margin_bottom = 12
|
||||
|
||||
[node name="ImportantStatIcon" type="TextureRect" parent="ImportantStat/CenterContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1964894247]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="HeaderContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=996864300]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Titles" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HeaderContainer" unique_id=1046118576]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = 0
|
||||
alignment = 1
|
||||
|
||||
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/HeaderContainer/Titles" unique_id=1630293611]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "Hello"
|
||||
label_settings = SubResource("LabelSettings_gibok")
|
||||
|
||||
[node name="Subtitle" type="Label" parent="MarginContainer/VBoxContainer/HeaderContainer/Titles" unique_id=715832106]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
label_settings = SubResource("LabelSettings_vnqhg")
|
||||
|
||||
[node name="ImportantStat" type="HBoxContainer" parent="MarginContainer/VBoxContainer/HeaderContainer" unique_id=637623184]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
|
||||
[node name="ImportantStatText" type="Label" parent="MarginContainer/VBoxContainer/HeaderContainer/ImportantStat" unique_id=1183919207]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "8"
|
||||
label_settings = SubResource("LabelSettings_on5kv")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ImportantStatIcon" type="TextureRect" parent="MarginContainer/VBoxContainer/HeaderContainer/ImportantStat" unique_id=1669153698]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(1, 0.6509804, 0.09019608, 1)
|
||||
custom_minimum_size = Vector2(60, 60)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_kpm7h")
|
||||
expand_mode = 1
|
||||
texture = ExtResource("3_pmldi")
|
||||
expand_mode = 3
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="ImportantStatText" type="Label" parent="ImportantStat/CenterContainer"]
|
||||
[node name="StatsContainer" type="GridContainer" parent="MarginContainer/VBoxContainer" unique_id=608499902]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "10"
|
||||
label_settings = ExtResource("7_pmldi")
|
||||
theme_override_constants/h_separation = 8
|
||||
|
||||
[node name="ArrowDown" type="Control" parent="."]
|
||||
[node name="SectionContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer" unique_id=421491898]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="ArrowDown" type="Control" parent="." unique_id=114640296]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="ArrowDown"]
|
||||
[node name="TextureRect" type="TextureRect" parent="ArrowDown" unique_id=795266440]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
@@ -190,7 +157,5 @@ size_flags_horizontal = 4
|
||||
size_flags_vertical = 8
|
||||
texture = ExtResource("11_kpm7h")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_pmldi")
|
||||
}
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=966931682]
|
||||
libraries/ = SubResource("AnimationLibrary_pmldi")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bghefrgaujjt6"]
|
||||
[gd_scene format=3 uid="uid://bghefrgaujjt6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dcmee2jvohudl" path="res://gui/game/card/scripts/card_section.gd" id="1_41hkv"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_t7m3x"]
|
||||
@@ -8,9 +8,15 @@
|
||||
|
||||
[sub_resource type="Theme" id="Theme_vlpjv"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3ktqg"]
|
||||
bg_color = Color(1, 1, 1, 1)
|
||||
corner_radius_top_left = 10
|
||||
corner_radius_top_right = 10
|
||||
corner_radius_bottom_right = 10
|
||||
corner_radius_bottom_left = 10
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ycbno"]
|
||||
script = ExtResource("2_3ktqg")
|
||||
title_colored = true
|
||||
title_text = "Hello"
|
||||
title_icon = ExtResource("2_41hkv")
|
||||
text = "Hello"
|
||||
@@ -19,53 +25,56 @@ text = "Hello"
|
||||
font = ExtResource("3_3ktqg")
|
||||
font_size = 15
|
||||
|
||||
[node name="CardSection" type="VBoxContainer"]
|
||||
offset_right = 176.0
|
||||
offset_bottom = 71.0
|
||||
[node name="CardSection" type="PanelContainer" unique_id=691609187]
|
||||
self_modulate = Color(0.13725491, 0.39215687, 0.6666667, 1)
|
||||
offset_right = 141.0
|
||||
offset_bottom = 30.0
|
||||
theme = SubResource("Theme_vlpjv")
|
||||
theme_override_constants/separation = 6
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_3ktqg")
|
||||
script = ExtResource("1_41hkv")
|
||||
info = SubResource("Resource_ycbno")
|
||||
|
||||
[node name="CardSectionTitle" type="HBoxContainer" parent="."]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=1904543323]
|
||||
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="CardSectionContainer" type="HBoxContainer" parent="MarginContainer" unique_id=1321500002]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 8
|
||||
alignment = 1
|
||||
|
||||
[node name="CardSectionTitle" type="HBoxContainer" parent="MarginContainer/CardSectionContainer" unique_id=2055951870]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 0
|
||||
theme = ExtResource("1_t7m3x")
|
||||
theme_override_constants/separation = 6
|
||||
alignment = 1
|
||||
|
||||
[node name="TitleIcon" type="TextureRect" parent="CardSectionTitle"]
|
||||
[node name="TitleIcon" type="TextureRect" parent="MarginContainer/CardSectionContainer/CardSectionTitle" unique_id=1697232009]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.14509805, 0.75686276, 0.2784314, 1)
|
||||
custom_minimum_size = Vector2(20, 20)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("2_41hkv")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="TitleText" type="Label" parent="CardSectionTitle"]
|
||||
[node name="TitleText" type="Label" parent="MarginContainer/CardSectionContainer/CardSectionTitle" unique_id=1260458359]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.14509805, 0.75686276, 0.2784314, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("1_t7m3x")
|
||||
text = "Hello"
|
||||
label_settings = SubResource("LabelSettings_ycbno")
|
||||
autowrap_mode = 2
|
||||
|
||||
[node name="CardSectionTextContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_t7m3x")
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="Text" type="RichTextLabel" parent="CardSectionTextContainer"]
|
||||
[node name="Text" type="RichTextLabel" parent="MarginContainer/CardSectionContainer" unique_id=2102977326]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme = ExtResource("1_t7m3x")
|
||||
theme_override_colors/default_color = Color(0.0627451, 0.05882353, 0.16862746, 1)
|
||||
bbcode_enabled = true
|
||||
text = "Hello"
|
||||
text = "Lorem ipsum dolor sit amet"
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
vertical_alignment = 1
|
||||
|
||||
@@ -1,37 +1,60 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cpen6hj0rbw8x"]
|
||||
[gd_scene format=3 uid="uid://cpen6hj0rbw8x"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_6abif"]
|
||||
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="2_1d453"]
|
||||
[ext_resource type="Script" uid="uid://c8xxhu28xm4hy" path="res://gui/game/card/scripts/card_stat.gd" id="2_30iht"]
|
||||
[ext_resource type="Texture2D" uid="uid://baaujfw8piywi" path="res://common/icons/dna.svg" id="3_30iht"]
|
||||
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="3_c3wpw"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_n0n76"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c3wpw"]
|
||||
bg_color = Color(0.5882353, 0.7019608, 0.85882354, 1)
|
||||
corner_radius_top_left = 10
|
||||
corner_radius_top_right = 10
|
||||
corner_radius_bottom_right = 10
|
||||
corner_radius_bottom_left = 10
|
||||
|
||||
[sub_resource type="Resource" id="Resource_c3wpw"]
|
||||
script = ExtResource("3_c3wpw")
|
||||
text = "5"
|
||||
icon = ExtResource("3_30iht")
|
||||
|
||||
[node name="CardStat" type="HBoxContainer"]
|
||||
offset_right = 222.0
|
||||
offset_bottom = 30.0
|
||||
theme = ExtResource("1_6abif")
|
||||
theme_override_constants/separation = 6
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_n0n76"]
|
||||
font = ExtResource("2_1d453")
|
||||
font_size = 21
|
||||
|
||||
[node name="CardStat" type="PanelContainer" unique_id=951233065]
|
||||
custom_minimum_size = Vector2(0, 35)
|
||||
offset_right = 37.0
|
||||
offset_bottom = 35.0
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_c3wpw")
|
||||
script = ExtResource("2_30iht")
|
||||
info = SubResource("Resource_n0n76")
|
||||
info = SubResource("Resource_c3wpw")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=924241224]
|
||||
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="HBoxContainer" type="HBoxContainer" parent="MarginContainer" unique_id=1028022027]
|
||||
modulate = Color(0.13725491, 0.39215687, 0.6666667, 1)
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 0
|
||||
alignment = 1
|
||||
|
||||
[node name="RichTextLabel" type="Label" parent="MarginContainer/HBoxContainer" unique_id=486669629]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_6abif")
|
||||
text = "5"
|
||||
label_settings = SubResource("LabelSettings_n0n76")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/HBoxContainer" unique_id=1792367878]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(20, 20)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_30iht")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 4
|
||||
theme = ExtResource("1_6abif")
|
||||
bbcode_enabled = true
|
||||
text = "[b]10[/b] A very long text that will eventually break"
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
autowrap_mode = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=21 format=3 uid="uid://3ss8pvhsackj"]
|
||||
[gd_scene format=3 uid="uid://3ss8pvhsackj"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://753270jjxmfg" path="res://gui/game/card/card.tscn" id="1_we78f"]
|
||||
[ext_resource type="Shader" uid="uid://bqjwmomh851lc" path="res://common/vfx/materials/shaders/skew.gdshader" id="1_x54se"]
|
||||
@@ -15,20 +15,20 @@
|
||||
|
||||
[sub_resource type="Resource" id="Resource_l3vvu"]
|
||||
script = ExtResource("4_7xkgc")
|
||||
title_text = "Very nice section"
|
||||
title_text = "Hi"
|
||||
title_icon = ExtResource("5_lj1tr")
|
||||
text = "It's a very nice section with a very nice text"
|
||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_biqg7"]
|
||||
script = ExtResource("5_1et8x")
|
||||
text = "Dna"
|
||||
text = "5"
|
||||
icon = ExtResource("7_vabmf")
|
||||
metadata/_custom_type_script = "uid://b4tkium34c831"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gskac"]
|
||||
script = ExtResource("5_1et8x")
|
||||
text = "Growth"
|
||||
text = "4"
|
||||
icon = ExtResource("8_1vjtn")
|
||||
metadata/_custom_type_script = "uid://b4tkium34c831"
|
||||
|
||||
@@ -46,8 +46,8 @@ metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
||||
shader = ExtResource("1_x54se")
|
||||
shader_parameter/fov = 90.0
|
||||
shader_parameter/cull_back = true
|
||||
shader_parameter/y_rot = -6.6836714e-05
|
||||
shader_parameter/x_rot = -7.941689e-05
|
||||
shader_parameter/y_rot = -1.4576089e-33
|
||||
shader_parameter/x_rot = 9.688164e-35
|
||||
shader_parameter/inset = 0.0
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1et8x"]
|
||||
@@ -63,7 +63,7 @@ _data = {
|
||||
&"appear": SubResource("Animation_7xkgc")
|
||||
}
|
||||
|
||||
[node name="CardVisualiser" type="MarginContainer"]
|
||||
[node name="CardVisualiser" type="MarginContainer" unique_id=1151339649]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
@@ -72,7 +72,7 @@ anchor_bottom = 0.5
|
||||
offset_left = -125.0
|
||||
offset_top = -30.0
|
||||
offset_right = 125.0
|
||||
offset_bottom = 30.0
|
||||
offset_bottom = 131.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(1.0000002, 1.0000002)
|
||||
@@ -86,37 +86,38 @@ theme_override_constants/margin_bottom = -25
|
||||
script = ExtResource("2_ntbk8")
|
||||
card_info = SubResource("Resource_eb1v6")
|
||||
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
|
||||
[node name="SubViewportContainer" type="SubViewportContainer" parent="." unique_id=1594926759]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource("ShaderMaterial_bw03i")
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewportContainer" unique_id=2008659915]
|
||||
unique_name_in_owner = true
|
||||
transparent_bg = true
|
||||
handle_input_locally = false
|
||||
size = Vector2i(300, 110)
|
||||
size = Vector2i(300, 211)
|
||||
size_2d_override_stretch = true
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="CardContainer" type="MarginContainer" parent="SubViewportContainer/SubViewport"]
|
||||
[node name="CardContainer" type="MarginContainer" parent="SubViewportContainer/SubViewport" unique_id=1240228608]
|
||||
unique_name_in_owner = true
|
||||
offset_right = 300.0
|
||||
offset_bottom = 110.0
|
||||
offset_bottom = 211.0
|
||||
mouse_filter = 2
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 25
|
||||
theme_override_constants/margin_right = 25
|
||||
theme_override_constants/margin_bottom = 25
|
||||
|
||||
[node name="Card" parent="SubViewportContainer/SubViewport/CardContainer" instance=ExtResource("1_we78f")]
|
||||
[node name="Card" parent="SubViewportContainer/SubViewport/CardContainer" unique_id=1169470018 instance=ExtResource("1_we78f")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(250, 0)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
down_arrow = true
|
||||
info = SubResource("Resource_eb1v6")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=459254440]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_r0jrf")
|
||||
}
|
||||
libraries/ = SubResource("AnimationLibrary_r0jrf")
|
||||
|
||||
@@ -4,54 +4,57 @@ class_name Card
|
||||
|
||||
const CARD_STAT_SCENE : PackedScene = preload("res://gui/game/card/card_stat.tscn")
|
||||
const CARD_SECTION_SCENE : PackedScene = preload("res://gui/game/card/card_section.tscn")
|
||||
|
||||
@export var small_mode : bool = false
|
||||
@export var down_arrow : bool = false
|
||||
|
||||
@export var info : CardInfo = CardInfo.new("Default Card Name")
|
||||
|
||||
@export_tool_button("Update", "Callable") var update_action = update
|
||||
@export_tool_button("Reset Size", "Callable") var reset_size_action = func(): reset_size()
|
||||
|
||||
func _ready():
|
||||
update()
|
||||
# func _ready():
|
||||
# update()
|
||||
|
||||
func update():
|
||||
%CardTitle.text = info.title
|
||||
%CardUpperPart.self_modulate = info.bg_color
|
||||
%CardTypeIcon.texture = info.type_icon
|
||||
%EntityTexture.texture = info.texture
|
||||
pass
|
||||
%Title.text = info.title
|
||||
%Subtitle.visible = info.subtitle != ""
|
||||
%Subtitle.text = info.subtitle
|
||||
|
||||
%ImportantStat.visible = info.important_stat_text != "" or info.important_stat_icon != null
|
||||
%ImportantStatIcon.texture = info.important_stat_icon
|
||||
%ImportantStatText.text = info.important_stat_text
|
||||
|
||||
%ArrowDown.visible = down_arrow
|
||||
|
||||
self_modulate = Color.TRANSPARENT if small_mode else Color.WHITE
|
||||
%CardUpperPart.self_modulate.a = 0.7 if small_mode else 1.0
|
||||
|
||||
update_card_stats()
|
||||
update_card_sections()
|
||||
|
||||
await get_tree().create_timer(0.01).timeout
|
||||
|
||||
reset_size()
|
||||
|
||||
func update_card_stats():
|
||||
for stat in %CardStatsContainer.get_children():
|
||||
for stat in %StatsContainer.get_children():
|
||||
stat.queue_free()
|
||||
|
||||
%StatsContainer.visible = len(info.stats) > 0
|
||||
%StatsContainer.columns = max(1,len(info.stats))
|
||||
|
||||
for stat_info in info.stats:
|
||||
if stat_info:
|
||||
var new_stat : CardStat = CARD_STAT_SCENE.instantiate() as CardStat
|
||||
new_stat.info = stat_info
|
||||
%CardStatsContainer.add_child(new_stat)
|
||||
|
||||
%CardStats.visible = len(info.stats) != 0 && small_mode == false
|
||||
%StatsContainer.add_child(new_stat)
|
||||
|
||||
func update_card_sections():
|
||||
for stat in %CardSectionsContainer.get_children():
|
||||
for stat in %SectionContainer.get_children():
|
||||
stat.queue_free()
|
||||
|
||||
%SectionContainer.visible = len(info.sections) > 0
|
||||
|
||||
for sections_info in info.sections:
|
||||
if sections_info:
|
||||
var new_section : CardSection = CARD_SECTION_SCENE.instantiate() as CardSection
|
||||
new_section.info = sections_info
|
||||
%CardSectionsContainer.add_child(new_section)
|
||||
|
||||
%CardSections.visible = len(%CardSectionsContainer.get_children()) != 0 && small_mode == false
|
||||
%SectionContainer.add_child(new_section)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ extends Resource
|
||||
class_name CardInfo
|
||||
|
||||
@export var title : String
|
||||
@export var bg_color : Color = Color("2364aaff")
|
||||
@export var subtitle : String
|
||||
@export var type_icon : Texture = preload("res://common/icons/cube-3d-sphere.svg")
|
||||
@export var texture : Texture
|
||||
|
||||
@@ -14,5 +14,7 @@ class_name CardInfo
|
||||
|
||||
func _init(
|
||||
_title : String = "",
|
||||
_subtitle : String = ""
|
||||
):
|
||||
title = _title
|
||||
title = _title
|
||||
subtitle = _subtitle
|
||||
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends VBoxContainer
|
||||
extends PanelContainer
|
||||
class_name CardSection
|
||||
|
||||
const DEFAULT_ICON_COLOR = Color("96b3dbff")
|
||||
@@ -16,5 +16,4 @@ func update():
|
||||
%Text.text = info.text
|
||||
%TitleIcon.texture = info.title_icon
|
||||
%TitleText.text = info.title_text
|
||||
%TitleIcon.modulate = info.title_color if info.title_colored else DEFAULT_ICON_COLOR
|
||||
%TitleText.modulate = info.title_color if info.title_colored else DEFAULT_TITLE_COLOR
|
||||
self_modulate = info.color
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
extends Resource
|
||||
class_name CardSectionInfo
|
||||
|
||||
@export var title_colored : bool = false
|
||||
@export var title_color : Color = Color("25c147ff")
|
||||
@export var color : Color = Color('2364aaff')
|
||||
@export var title_text : String = ""
|
||||
@export var title_icon : Texture = null
|
||||
@export_multiline var text : String = ""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends HBoxContainer
|
||||
extends PanelContainer
|
||||
class_name CardStat
|
||||
|
||||
var is_ready = false
|
||||
@@ -16,5 +16,7 @@ func _ready():
|
||||
update()
|
||||
|
||||
func update():
|
||||
%RichTextLabel.visible = info.text != ""
|
||||
%RichTextLabel.text = info.text
|
||||
%TextureRect.visible = info.icon != null
|
||||
%TextureRect.texture = info.icon
|
||||
|
||||
@@ -20,14 +20,6 @@ var is_ready = false
|
||||
if is_ready :
|
||||
update()
|
||||
|
||||
@export var small_mode : bool = true :
|
||||
set(v):
|
||||
var old = small_mode
|
||||
small_mode = v
|
||||
if is_ready and old != small_mode :
|
||||
update()
|
||||
|
||||
@export var interactive_small_mode : bool = true
|
||||
@export var interactive_zoom : bool = false
|
||||
|
||||
@export var down_arrow : bool = true :
|
||||
@@ -62,11 +54,9 @@ func _process(_d):
|
||||
|
||||
if is_mouse_over():
|
||||
wanted_rot = center_relative_mouse_position * MAX_ROT
|
||||
if interactive_small_mode: small_mode = false
|
||||
if interactive_zoom: scale = scale.lerp(Vector2.ONE * ZOOM_SCALE, 0.2)
|
||||
else:
|
||||
wanted_rot = Vector2.ZERO
|
||||
if interactive_small_mode: small_mode = true
|
||||
if interactive_zoom: scale = scale.lerp(Vector2.ONE, 0.2)
|
||||
|
||||
real_rot = real_rot.lerp(wanted_rot, 0.1)
|
||||
@@ -92,7 +82,6 @@ func is_mouse_over() -> bool:
|
||||
func update():
|
||||
if card_info:
|
||||
%Card.info = card_info
|
||||
%Card.small_mode = small_mode
|
||||
%Card.down_arrow = down_arrow
|
||||
%Card.update()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://12nak7amd1uq"]
|
||||
[gd_scene format=3 uid="uid://12nak7amd1uq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/game/scripts/game_gui.gd" id="1_udau0"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="2_nq5i2"]
|
||||
@@ -8,10 +8,10 @@
|
||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_id0t5"]
|
||||
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
|
||||
|
||||
[node name="GameGui" type="CanvasLayer"]
|
||||
[node name="GameGui" type="CanvasLayer" unique_id=274698556]
|
||||
script = ExtResource("1_udau0")
|
||||
|
||||
[node name="ScoreParticles" type="Control" parent="."]
|
||||
[node name="ScoreParticles" type="Control" parent="." unique_id=842190807]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
@@ -21,10 +21,10 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Announce" parent="." instance=ExtResource("4_h6540")]
|
||||
[node name="Announce" parent="." unique_id=94658910 instance=ExtResource("4_h6540")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="." unique_id=2054297293]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -33,15 +33,17 @@ grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme = ExtResource("2_nq5i2")
|
||||
|
||||
[node name="EnergyInfo" parent="MarginContainer" instance=ExtResource("4_2wykm")]
|
||||
[node name="EnergyInfo" parent="MarginContainer" unique_id=1742208693 instance=ExtResource("4_2wykm")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer" unique_id=1862106420]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="ChargeCount" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||
[node name="ChargeCount" type="Label" parent="MarginContainer/VBoxContainer" unique_id=587242538]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
@@ -51,25 +53,27 @@ label_settings = ExtResource("4_ujg5r")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="QuotaProgressBar" type="ProgressBar" parent="MarginContainer/VBoxContainer"]
|
||||
[node name="QuotaProgressBar" type="ProgressBar" parent="MarginContainer/VBoxContainer" unique_id=1464968400]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(400, 50)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme = ExtResource("2_nq5i2")
|
||||
rounded = true
|
||||
show_percentage = false
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/QuotaProgressBar"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/QuotaProgressBar" unique_id=1897590382]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_constants/separation = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="ObjectiveProgressText" type="Label" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer"]
|
||||
[node name="ObjectiveProgressText" type="Label" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer" unique_id=1326076389]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "X"
|
||||
@@ -77,14 +81,15 @@ label_settings = ExtResource("4_ujg5r")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="ObjectiveIcon" type="TextureRect" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer"]
|
||||
[node name="ObjectiveIcon" type="TextureRect" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer" unique_id=857464776]
|
||||
custom_minimum_size = Vector2(30, 30)
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
texture = ExtResource("7_id0t5")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="Inventory" parent="MarginContainer" instance=ExtResource("9_id0t5")]
|
||||
[node name="Inventory" parent="MarginContainer" unique_id=1407862321 instance=ExtResource("9_id0t5")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://yk78ubpu5ghq"]
|
||||
[gd_scene format=3 uid="uid://yk78ubpu5ghq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://2qomrdxbvxqa" path="res://gui/game/pass_day/scripts/pass_day.gd" id="1_0pm4g"]
|
||||
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://common/vfx/materials/shaders/blur.gdshader" id="1_v570a"]
|
||||
@@ -10,24 +10,17 @@
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_27lg1"]
|
||||
shader = ExtResource("1_v570a")
|
||||
shader_parameter/strength = 10.0
|
||||
shader_parameter/mix_percentage = 0.8
|
||||
shader_parameter/strength = 0.0
|
||||
shader_parameter/mix_percentage = 0.0
|
||||
|
||||
[node name="PassDay" type="Control"]
|
||||
z_index = 100
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
[node name="PassDay" type="CanvasLayer" unique_id=335255544]
|
||||
layer = 3
|
||||
script = ExtResource("1_0pm4g")
|
||||
|
||||
[node name="Blur" type="ColorRect" parent="."]
|
||||
[node name="Blur" type="ColorRect" parent="." unique_id=546890405]
|
||||
unique_name_in_owner = true
|
||||
physics_interpolation_mode = 0
|
||||
material = SubResource("ShaderMaterial_27lg1")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -35,12 +28,10 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("2_bhfpo")
|
||||
blur_strength = 10.0
|
||||
blur_mix_percentage = 0.8
|
||||
|
||||
[node name="PassDayInfo" type="VBoxContainer" parent="."]
|
||||
[node name="PassDayInfo" type="VBoxContainer" parent="." unique_id=833110506]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
visible = false
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -49,17 +40,17 @@ grow_vertical = 2
|
||||
theme = ExtResource("4_0pm4g")
|
||||
alignment = 1
|
||||
|
||||
[node name="PassDayInfoAnimationPlayer" type="Node" parent="PassDayInfo"]
|
||||
[node name="PassDayInfoAnimationPlayer" type="Node" parent="PassDayInfo" unique_id=857480517]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("5_dqmg8")
|
||||
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
|
||||
|
||||
[node name="EnergyPassDayInfo" parent="PassDayInfo" instance=ExtResource("2_feyaf")]
|
||||
[node name="EnergyPassDayInfo" parent="PassDayInfo" unique_id=2044341204 instance=ExtResource("2_feyaf")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="ChargeCount" type="Label" parent="PassDayInfo"]
|
||||
[node name="ChargeCount" type="Label" parent="PassDayInfo" unique_id=1326590358]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends Control
|
||||
extends CanvasLayer
|
||||
class_name PassDay
|
||||
|
||||
const BLUR_STRENGTH = 10
|
||||
@@ -26,6 +26,7 @@ var is_animation_disappeared := false
|
||||
func _ready():
|
||||
hide()
|
||||
setup_energy_values()
|
||||
%Blur.show()
|
||||
%PassDayInfo.hide()
|
||||
|
||||
func _process(delta):
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://csiacsndm62ll"]
|
||||
[gd_scene format=3 uid="uid://csiacsndm62ll"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/hud.tres" id="1_51ks3"]
|
||||
[ext_resource type="Script" uid="uid://crt2d4m5ba25i" path="res://gui/game/pause/scripts/pause.gd" id="1_he4ox"]
|
||||
@@ -81,13 +81,13 @@ _data = {
|
||||
&"pause": SubResource("Animation_apjlw")
|
||||
}
|
||||
|
||||
[node name="Pause" type="CanvasLayer"]
|
||||
[node name="Pause" type="CanvasLayer" unique_id=2045727851]
|
||||
process_mode = 3
|
||||
layer = 100
|
||||
visible = false
|
||||
script = ExtResource("1_he4ox")
|
||||
|
||||
[node name="Container" type="Control" parent="."]
|
||||
[node name="Container" type="Control" parent="." unique_id=69447299]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -95,7 +95,7 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Container"]
|
||||
[node name="ColorRect" type="ColorRect" parent="Container" unique_id=862826206]
|
||||
material = SubResource("ShaderMaterial_58dya")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
@@ -105,7 +105,7 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Container"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Container" unique_id=243001225]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -114,57 +114,55 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_51ks3")
|
||||
|
||||
[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer"]
|
||||
[node name="Pause" type="VBoxContainer" parent="Container/MarginContainer" unique_id=1262577626]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_51ks3")
|
||||
theme_override_constants/separation = 20
|
||||
alignment = 1
|
||||
|
||||
[node name="PauseTitle" type="Label" parent="Container/MarginContainer/Pause"]
|
||||
[node name="PauseTitle" type="Label" parent="Container/MarginContainer/Pause" unique_id=1390949032]
|
||||
layout_mode = 2
|
||||
text = "PAUSE"
|
||||
label_settings = SubResource("LabelSettings_apjlw")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/Pause"]
|
||||
[node name="HBoxContainer" type="VBoxContainer" parent="Container/MarginContainer/Pause" unique_id=616663351]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="Resume" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
|
||||
[node name="Resume" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=163836777]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("1_51ks3")
|
||||
text = "RESUME_GAME"
|
||||
icon = ExtResource("5_apjlw")
|
||||
|
||||
[node name="Settings" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
|
||||
[node name="Settings" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1532435179]
|
||||
layout_mode = 2
|
||||
text = "SETTINGS"
|
||||
icon = ExtResource("6_yj6f1")
|
||||
|
||||
[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
|
||||
[node name="Controls" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=138156239]
|
||||
layout_mode = 2
|
||||
text = "CONTROLS"
|
||||
icon = ExtResource("7_7c7ks")
|
||||
|
||||
[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer"]
|
||||
[node name="Quit" type="Button" parent="Container/MarginContainer/Pause/HBoxContainer" unique_id=1740895928]
|
||||
layout_mode = 2
|
||||
text = "QUIT"
|
||||
icon = ExtResource("7_yj6f1")
|
||||
|
||||
[node name="Settings" parent="." instance=ExtResource("4_58dya")]
|
||||
[node name="Settings" parent="." unique_id=758381952 instance=ExtResource("4_58dya")]
|
||||
unique_name_in_owner = true
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Controls" parent="." instance=ExtResource("11_urlqn")]
|
||||
[node name="Controls" parent="." unique_id=358658336 instance=ExtResource("11_urlqn")]
|
||||
unique_name_in_owner = true
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1779993260]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_yj6f1")
|
||||
}
|
||||
libraries/ = SubResource("AnimationLibrary_yj6f1")
|
||||
|
||||
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Resume" to="." method="_on_resume_pressed"]
|
||||
[connection signal="pressed" from="Container/MarginContainer/Pause/HBoxContainer/Settings" to="." method="_on_settings_pressed"]
|
||||
|
||||
@@ -14,8 +14,11 @@ func set_pause(p):
|
||||
%Controls.close_controls()
|
||||
if p :
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
elif SceneManager.actual_scene.mouse_captured:
|
||||
elif GameInfo.game_data.actual_scene.mouse_captured:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
if not p:
|
||||
GameInfo.save_settings()
|
||||
|
||||
func _input(_event):
|
||||
if Input.is_action_just_pressed("pause"):
|
||||
|
||||
@@ -13,7 +13,7 @@ func _ready():
|
||||
GameInfo.game_data.current_region_data.plant_changing_score.connect(_on_plant_changing_score)
|
||||
GameInfo.game_data.player_data.updated.connect(_on_player_updated)
|
||||
GameInfo.game_data.current_region_data.pass_day_ended.connect(_on_region_pass_day_ended)
|
||||
|
||||
|
||||
score_mirror = GameInfo.game_data.current_region_data.get_score()
|
||||
|
||||
charge_update(GameInfo.game_data.current_region_data)
|
||||
@@ -51,6 +51,8 @@ func score_update(with_animation = true):
|
||||
else: %QuotaProgressBar.value = objective_progression_percent
|
||||
|
||||
func _on_plant_changing_score(plant_data: PlantData, amount : int):
|
||||
if GameInfo.game_data.current_region_data.in_passing_day_animation:
|
||||
await GameInfo.game_data.current_region_data.pass_day_ended
|
||||
if amount <= 0:
|
||||
score_mirror += amount
|
||||
else :
|
||||
@@ -64,15 +66,13 @@ func _on_plant_changing_score(plant_data: PlantData, amount : int):
|
||||
0.8
|
||||
)
|
||||
|
||||
await get_tree().create_timer(0.3 / max(1,i)).timeout
|
||||
await get_tree().create_timer(0.5 / max(1.,i)).timeout
|
||||
|
||||
func spawn_score_particle(
|
||||
from_position,
|
||||
to_position,
|
||||
duration
|
||||
):
|
||||
if GameInfo.game_data.current_region_data.in_passing_day_animation:
|
||||
await GameInfo.game_data.current_region_data.pass_day_ended
|
||||
var sprite_particle = Sprite2D.new()
|
||||
sprite_particle.texture = SCORE_ICON
|
||||
%ScoreParticles.add_child(sprite_particle)
|
||||
|
||||
Reference in New Issue
Block a user