#22 développement du pourcentage de contamination
This commit is contained in:
|
Before Width: | Height: | Size: 887 B After Width: | Height: | Size: 887 B |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dcgnamu7sb3ov"
|
||||
path="res://.godot/imported/bolt.svg-346ec638bad7861a6c0a47abfe0480f6.ctex"
|
||||
path="res://.godot/imported/bolt.svg-99699818681b1e0e18f4836dfd772b8c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://gui/player_info/assets/icons/bolt.svg"
|
||||
dest_files=["res://.godot/imported/bolt.svg-346ec638bad7861a6c0a47abfe0480f6.ctex"]
|
||||
source_file="res://gui/assets/icons/bolt.svg"
|
||||
dest_files=["res://.godot/imported/bolt.svg-99699818681b1e0e18f4836dfd772b8c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 294 KiB After Width: | Height: | Size: 294 KiB |
@@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cm3ehinvvj52i"
|
||||
path="res://.godot/imported/Interface sans boutons.png-6f58a6b9570fde0ac2945334970770a8.ctex"
|
||||
path="res://.godot/imported/Interface sans boutons.png-84e848a01e86bdad058d81d09d7731ba.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://gui/player_info/assets/texture/Interface sans boutons.png"
|
||||
dest_files=["res://.godot/imported/Interface sans boutons.png-6f58a6b9570fde0ac2945334970770a8.ctex"]
|
||||
source_file="res://gui/assets/texture/Interface sans boutons.png"
|
||||
dest_files=["res://.godot/imported/Interface sans boutons.png-84e848a01e86bdad058d81d09d7731ba.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://baqrmhsgqda6v"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpqh8n0lbluf8" path="res://gui/player_info/scripts/player_info.gd" id="1_ghu0s"]
|
||||
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/player_info/assets/texture/Interface sans boutons.png" id="2_cgy6f"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/player_info/assets/icons/bolt.svg" id="3_s4ggy"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="4_cgy6f"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/default_label_settings.tres" id="5_s4ggy"]
|
||||
|
||||
[node name="PlayerInfo" type="Control"]
|
||||
custom_minimum_size = Vector2(337, 160)
|
||||
layout_mode = 3
|
||||
anchor_right = 0.293
|
||||
anchor_bottom = 0.247
|
||||
offset_right = -0.536011
|
||||
offset_bottom = -0.0559998
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
script = ExtResource("1_ghu0s")
|
||||
|
||||
[node name="Background" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_cgy6f")
|
||||
expand_mode = 2
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="EnergyInfo" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.281899
|
||||
anchor_top = 0.384375
|
||||
anchor_right = 0.281899
|
||||
anchor_bottom = 0.584375
|
||||
offset_left = -44.0
|
||||
offset_top = -12.5
|
||||
offset_right = 44.0
|
||||
offset_bottom = 12.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="EnergyInfo"]
|
||||
custom_minimum_size = Vector2(36.64, 0)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("3_s4ggy")
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="Label" type="Label" parent="EnergyInfo"]
|
||||
layout_mode = 2
|
||||
theme = ExtResource("4_cgy6f")
|
||||
text = "0"
|
||||
label_settings = ExtResource("5_s4ggy")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Inventory" type="HBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 157.0
|
||||
offset_top = 86.0
|
||||
offset_right = 291.0
|
||||
offset_bottom = 126.0
|
||||
alignment = 1
|
||||
@@ -1,4 +0,0 @@
|
||||
extends Control
|
||||
|
||||
func player_update(player: Player):
|
||||
$EnergyInfo/Label.text = str(player.energy)
|
||||
@@ -1 +0,0 @@
|
||||
uid://bpqh8n0lbluf8
|
||||
@@ -1,9 +1,9 @@
|
||||
[gd_scene load_steps=16 format=3 uid="uid://12nak7amd1uq"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://baqrmhsgqda6v" path="res://gui/player_info/player_info.tscn" id="1_8kw6x"]
|
||||
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/scripts/root_gui.gd" id="1_udau0"]
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_nq5i2"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/player_info/assets/icons/bolt.svg" id="4_k4juk"]
|
||||
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/assets/texture/Interface sans boutons.png" id="3_n4kem"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://gui/assets/icons/bolt.svg" id="4_k4juk"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/default_label_settings.tres" id="4_ujg5r"]
|
||||
[ext_resource type="Texture2D" uid="uid://c2pgaklnj5w3d" path="res://gui/assets/texture/Tablette info.png" id="6_fovlv"]
|
||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_n4kem"]
|
||||
@@ -137,8 +137,64 @@ grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme = ExtResource("2_nq5i2")
|
||||
|
||||
[node name="PlayerInfo" parent="MarginContainer" instance=ExtResource("1_8kw6x")]
|
||||
[node name="PlayerInfo" type="Control" parent="MarginContainer"]
|
||||
custom_minimum_size = Vector2(337, 160)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
|
||||
[node name="Background" type="TextureRect" parent="MarginContainer/PlayerInfo"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("3_n4kem")
|
||||
expand_mode = 2
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="EnergyInfo" type="HBoxContainer" parent="MarginContainer/PlayerInfo"]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.281899
|
||||
anchor_top = 0.384375
|
||||
anchor_right = 0.281899
|
||||
anchor_bottom = 0.584375
|
||||
offset_left = -44.0
|
||||
offset_top = -12.5
|
||||
offset_right = 44.0
|
||||
offset_bottom = 12.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Icon" type="TextureRect" parent="MarginContainer/PlayerInfo/EnergyInfo"]
|
||||
custom_minimum_size = Vector2(36.64, 0)
|
||||
layout_mode = 2
|
||||
texture = ExtResource("4_k4juk")
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="EnergyCount" type="Label" parent="MarginContainer/PlayerInfo/EnergyInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme = ExtResource("2_nq5i2")
|
||||
text = "0"
|
||||
label_settings = ExtResource("4_ujg5r")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="DecontaminationCoverage" type="Label" parent="MarginContainer/PlayerInfo"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 157.0
|
||||
offset_top = 86.0
|
||||
offset_right = 291.0
|
||||
offset_bottom = 126.0
|
||||
text = "100%"
|
||||
label_settings = ExtResource("4_ujg5r")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="DayPass" type="Button" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
@@ -7,7 +7,7 @@ signal day_pass_proceed
|
||||
signal day_pass_finished
|
||||
|
||||
func _on_player_updated(player:Player):
|
||||
$MarginContainer/PlayerInfo.player_update(player)
|
||||
%EnergyCount.text = str(player.energy)
|
||||
|
||||
%AvailableActions/GetItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() == 0
|
||||
%AvailableActions/SwapItem.visible = player.closest_interactable is ItemObject and player.inventory.lenght() > 0
|
||||
@@ -23,9 +23,6 @@ func _on_player_updated(player:Player):
|
||||
%ItemName.text = item.name
|
||||
%ItemDesc.text = item.description
|
||||
|
||||
func _on_planet_planet_stats_updated(day:int):
|
||||
$MarginContainer/DayCount.text = "Day " + str(day)
|
||||
|
||||
func _on_day_pass_pressed():
|
||||
day_pass_pressed.emit()
|
||||
$AnimationPlayer.play("recharge_fade_in")
|
||||
@@ -37,3 +34,7 @@ func _on_day_pass_pressed():
|
||||
|
||||
func _on_game_action_button_down():
|
||||
game_click.emit()
|
||||
|
||||
func _on_planet_updated(planet:Planet):
|
||||
$MarginContainer/DayCount.text = "Day " + str(planet.day)
|
||||
%DecontaminationCoverage.text = str(roundi(planet.decontamination_coverage * 100)) + "%"
|
||||
|
||||
Reference in New Issue
Block a user