[EDIT] implemented end game window assets
This commit is contained in:
parent
c1f4f87efa
commit
b1eb2834cb
@ -1,8 +1,11 @@
|
|||||||
[gd_scene load_steps=4 format=2]
|
[gd_scene load_steps=7 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Scripts/EndGameWindow.gd" type="Script" id=1]
|
[ext_resource path="res://Scripts/EndGameWindow.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Font/COMIC.tres" type="DynamicFont" id=2]
|
[ext_resource path="res://Font/COMIC.tres" type="DynamicFont" id=2]
|
||||||
[ext_resource path="res://Sounds/PaintJamEndGameTheme.wav" type="AudioStream" id=3]
|
[ext_resource path="res://Sounds/PaintJamEndGameTheme.wav" type="AudioStream" id=3]
|
||||||
|
[ext_resource path="res://Assets/QUIT WINNING.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://Assets/WINNER.png" type="Texture" id=5]
|
||||||
|
[ext_resource path="res://Assets/RESTART WINNING.png" type="Texture" id=6]
|
||||||
|
|
||||||
[node name="CanvasLayer" type="CanvasLayer"]
|
[node name="CanvasLayer" type="CanvasLayer"]
|
||||||
layer = 100
|
layer = 100
|
||||||
@ -29,43 +32,17 @@ __meta__ = {
|
|||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="Window"]
|
[node name="WinnerPopUp" type="Sprite" parent="Window"]
|
||||||
anchor_left = 0.5
|
position = Vector2( 951.212, 510.746 )
|
||||||
anchor_top = 0.5
|
texture = ExtResource( 5 )
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
margin_left = -267.0
|
|
||||||
margin_top = -254.0
|
|
||||||
margin_right = 256.0
|
|
||||||
margin_bottom = 82.0
|
|
||||||
color = Color( 0, 0, 0, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="Window/ColorRect"]
|
[node name="WinnerName" type="Label" parent="Window/WinnerPopUp"]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
margin_left = -60.5
|
margin_left = -876.595
|
||||||
margin_top = 28.0
|
margin_top = 59.2959
|
||||||
margin_right = 83.5
|
margin_right = -673.595
|
||||||
margin_bottom = 80.0
|
margin_bottom = 111.296
|
||||||
custom_fonts/font = ExtResource( 2 )
|
|
||||||
text = "Winner:"
|
|
||||||
align = 1
|
|
||||||
valign = 1
|
|
||||||
autowrap = true
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="WinnerName" type="Label" parent="Window/ColorRect"]
|
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
margin_left = -53.5
|
|
||||||
margin_top = 130.0
|
|
||||||
margin_right = 70.5
|
|
||||||
margin_bottom = 182.0
|
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
text = "AZER"
|
text = "AZER"
|
||||||
align = 1
|
align = 1
|
||||||
@ -75,33 +52,28 @@ __meta__ = {
|
|||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="VBoxContainer" type="HBoxContainer" parent="Window/ColorRect"]
|
[node name="RestartButton" type="TextureButton" parent="Window/WinnerPopUp"]
|
||||||
anchor_top = 1.0
|
margin_left = -403.089
|
||||||
anchor_right = 1.0
|
margin_top = 187.089
|
||||||
anchor_bottom = 1.0
|
margin_right = 11.9109
|
||||||
margin_top = -81.0
|
margin_bottom = 328.089
|
||||||
margin_bottom = -6.0
|
texture_normal = ExtResource( 6 )
|
||||||
custom_constants/separation = 25
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
[node name="RestartButton" type="Button" parent="Window/ColorRect/VBoxContainer"]
|
[node name="QuitButton" type="TextureButton" parent="Window/WinnerPopUp"]
|
||||||
margin_right = 249.0
|
margin_left = 39.6559
|
||||||
margin_bottom = 75.0
|
margin_top = 184.284
|
||||||
size_flags_horizontal = 3
|
margin_right = 432.656
|
||||||
size_flags_vertical = 3
|
margin_bottom = 315.284
|
||||||
custom_fonts/font = ExtResource( 2 )
|
texture_normal = ExtResource( 4 )
|
||||||
text = "Restart"
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
[node name="QuitButton" type="Button" parent="Window/ColorRect/VBoxContainer"]
|
}
|
||||||
margin_left = 274.0
|
|
||||||
margin_right = 523.0
|
|
||||||
margin_bottom = 75.0
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
size_flags_vertical = 3
|
|
||||||
custom_fonts/font = ExtResource( 2 )
|
|
||||||
text = "Quit"
|
|
||||||
|
|
||||||
[node name="EndGameTheme" type="AudioStreamPlayer" parent="."]
|
[node name="EndGameTheme" type="AudioStreamPlayer" parent="."]
|
||||||
pause_mode = 2
|
pause_mode = 2
|
||||||
stream = ExtResource( 3 )
|
stream = ExtResource( 3 )
|
||||||
[connection signal="pressed" from="Window/ColorRect/VBoxContainer/RestartButton" to="Window" method="_on_RestartButton_pressed"]
|
[connection signal="pressed" from="Window/WinnerPopUp/RestartButton" to="Window" method="_on_RestartButton_pressed"]
|
||||||
[connection signal="pressed" from="Window/ColorRect/VBoxContainer/QuitButton" to="Window" method="_on_QuitButton_pressed"]
|
[connection signal="pressed" from="Window/WinnerPopUp/QuitButton" to="Window" method="_on_QuitButton_pressed"]
|
||||||
|
|||||||
@ -5,7 +5,7 @@ func showEndGameWindow(playerName):
|
|||||||
audioPlayer.play()
|
audioPlayer.play()
|
||||||
get_tree().paused = true
|
get_tree().paused = true
|
||||||
self.visible = true
|
self.visible = true
|
||||||
get_node("/root/World/CanvasLayer/Window/ColorRect/WinnerName").text = playerName
|
get_node("/root/World/CanvasLayer/Window/WinnerPopUp/WinnerName").text = playerName
|
||||||
|
|
||||||
|
|
||||||
func _on_RestartButton_pressed():
|
func _on_RestartButton_pressed():
|
||||||
|
|||||||
@ -17,7 +17,6 @@ func _process(_delta):
|
|||||||
func _on_StartButton_pressed():
|
func _on_StartButton_pressed():
|
||||||
get_tree().change_scene("res://Scene/GameMap.tscn")
|
get_tree().change_scene("res://Scene/GameMap.tscn")
|
||||||
|
|
||||||
|
|
||||||
func _on_QuitButton_pressed():
|
func _on_QuitButton_pressed():
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user