1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2024-11-24 05:34:18 +00:00

roba strana fixata + neve

This commit is contained in:
Maxim Lobovsky 2022-04-04 19:55:11 +02:00
parent 5ea662ce0a
commit 65f583a232
4 changed files with 64 additions and 46 deletions

View file

@ -6,10 +6,8 @@
[ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4] [ext_resource path="res://src/entities/players/PhaseOnePlayer.tscn" type="PackedScene" id=4]
[ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5] [ext_resource path="res://src/mechanics/RNG.tscn" type="PackedScene" id=5]
[ext_resource path="res://src/levels/Game.gd" type="Script" id=6] [ext_resource path="res://src/levels/Game.gd" type="Script" id=6]
[ext_resource path="res://src/ui/TimeSurvived.tscn" type="PackedScene" id=7] [ext_resource path="res://src/ui/TheDarkNightUI.tscn" type="PackedScene" id=8]
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=8]
[ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11] [ext_resource path="res://src/levels/PhaseOneMusic.gd" type="Script" id=11]
[ext_resource path="res://src/ui/HealthBar.tscn" type="PackedScene" id=14]
[ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19] [ext_resource path="res://src/music/BaseDrum.mp3" type="AudioStream" id=19]
[ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20] [ext_resource path="res://src/music/BaseBell.mp3" type="AudioStream" id=20]
[ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21] [ext_resource path="res://src/music/BaseChoir.mp3" type="AudioStream" id=21]
@ -31,8 +29,20 @@ scale_random = 1.0
size = 22 size = 22
font_data = ExtResource( 8 ) font_data = ExtResource( 8 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 1 ) func _ready():
var game = get_tree().root.get_node(\"Game\")
game.connect(\"survival_seconds_updated\", self, \"_on_survival_seconds_updated\")
func _on_survival_seconds_updated(value: float):
# warning-ignore:NARROWING_CONVERSION
var minutes: int = floor(value / 60)
var seconds_and_millis: float = value - minutes * 60
var seconds: int = int(seconds_and_millis)
var millis: int = int((seconds_and_millis - seconds) * 1000)
text = \"%02d:%02d.%03d\" % ([minutes, seconds, millis])
"
[node name="Game" type="Node2D"] [node name="Game" type="Node2D"]
script = ExtResource( 6 ) script = ExtResource( 6 )
@ -89,24 +99,37 @@ process_material = SubResource( 5 )
[node name="UserInterface" type="CanvasLayer" parent="."] [node name="UserInterface" type="CanvasLayer" parent="."]
[node name="UserIntefaceContainer" type="Panel" parent="UserInterface"] [node name="TheDarkNightUI" parent="UserInterface" instance=ExtResource( 8 )]
light_mask = 2 anchor_left = 0.0
anchor_left = 0.5 anchor_right = 1.0
anchor_top = 1.0 margin_left = 0.0
anchor_right = 0.5 margin_right = 0.0
[node name="Panel" type="Panel" parent="UserInterface/TheDarkNightUI"]
anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
margin_left = -640.0
margin_top = -80.0
margin_right = 640.0
theme = SubResource( 2 )
[node name="TimeSurvived" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 7 )] [node name="TimeSurvived" type="Label" parent="UserInterface/TheDarkNightUI/Panel"]
margin_left = -45.5 anchor_left = 1.0
margin_top = -14.5 anchor_right = 1.0
margin_right = 45.5 anchor_bottom = 1.0
margin_bottom = 14.5 margin_top = 14.0
margin_right = -14.0
margin_bottom = -14.0
grow_horizontal = 0
grow_vertical = 2
text = "00:00.000"
align = 2
valign = 1
script = SubResource( 1 )
[node name="HealthBar" parent="UserInterface/UserIntefaceContainer" instance=ExtResource( 14 )] [node name="HealthBar" type="ProgressBar" parent="UserInterface/TheDarkNightUI/Panel"]
anchor_bottom = 1.0
margin_left = 14.0 margin_left = 14.0
margin_top = 14.0
margin_right = 320.0
margin_bottom = -14.0
grow_vertical = 2
value = 50.0
[connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"] [connection signal="intensity_changed" from="PhaseOne/Entities/Fire" to="PhaseOne/Music" method="_on_Fire_intensity_changed"]

View file

@ -1,10 +0,0 @@
[gd_scene format=2]
[node name="HealthBar" type="ProgressBar"]
anchor_top = 0.5
anchor_bottom = 0.5
margin_top = -14.0
margin_right = 320.0
margin_bottom = 14.0
step = 1.0
value = 50.0

View file

@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://src/ui/fonts/SourceSerifPro-Regular.ttf" type="DynamicFontData" id=4]
[sub_resource type="DynamicFont" id=1]
size = 22
font_data = ExtResource( 4 )
[sub_resource type="Theme" id=2]
default_font = SubResource( 1 )
[node name="TheDarkNightUI" type="Control"]
light_mask = 2
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
margin_left = -640.0
margin_top = -80.0
margin_right = 640.0
theme = SubResource( 2 )

View file

@ -1,16 +0,0 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://src/ui/TimeSurvived.gd" type="Script" id=1]
[node name="TimeSurvived" type="Label"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -32.0
margin_top = -7.0
margin_right = 32.0
margin_bottom = 7.0
text = "00:00.000"
align = 1
script = ExtResource( 1 )