ugly win screen completed

This commit is contained in:
Leon Palluch committed 2020-02-01 15:09:11 +01:00
1 parent 7d4d0254d9
commit 677138d145
4 files changed
+98 -15

No files matched your search

+29 -5
View File
@@ -10,28 +10,52 @@ __meta__ = {
"_edit_use_anchors_": false
}
labelPath = NodePath("MarginContainer/VBoxContainer/PlayerWon")
continuePath = NodePath("MarginContainer/VBoxContainer/Control/Continue")
[node name="MarginContainer" type="MarginContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
margin_right = 1024.0
margin_bottom = 600.0
[node name="Congratz" type="Label" parent="MarginContainer/VBoxContainer"]
margin_top = -1.0
margin_right = 1024.0
margin_bottom = 249.0
margin_bottom = 250.0
rect_min_size = Vector2( 0, 250 )
text = "CONGRATULATIONS!"
align = 1
valign = 2
[node name="PlayerWon" type="Label" parent="MarginContainer/VBoxContainer"]
margin_top = 254.0
margin_top = 253.0
margin_right = 1024.0
margin_bottom = 404.0
rect_min_size = Vector2( 0, 150 )
margin_bottom = 503.0
rect_min_size = Vector2( 0, 250 )
align = 1
valign = 1
[node name="Control" type="Control" parent="MarginContainer/VBoxContainer"]
margin_top = 508.0
margin_right = 1024.0
margin_bottom = 508.0
[node name="Continue" type="Button" parent="MarginContainer/VBoxContainer/Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -100.0
margin_top = -10.0
margin_right = 100.0
margin_bottom = 15.0
rect_min_size = Vector2( 200, 25 )
text = "Continue"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="MarginContainer/VBoxContainer/Control/Continue" to="." method="_on_Continue_pressed"]
+11 -10
View File
@@ -1,22 +1,23 @@
extends Control
export(NodePath) var labelPath
export(NodePath) var continuePath
#signal player_win(player_id)
signal start_fight()
var _playerWonLabel
var _continueButton
# Called when the node enters the scene tree for the first time.
func _ready():
_playerWonLabel = get_node(labelPath) as Label
#connect("player_win", self, "_win_message")
#emit_signal("player_win", 1)
_continueButton = get_node(continuePath) as Label
func _win_message(player_id):
_playerWonLabel.text = "test"
func set_win_message(player_id):
_playerWonLabel.text = "Player " + str(player_id + 1) + " is victorious!"
func _on_Continue_pressed():
print("test2")
#print("game won!")
#print(player_id)
emit_signal("start_fight")