diff --git a/UI/WinScreen.tscn b/UI/WinScreen.tscn new file mode 100644 index 0000000..77fb92c --- /dev/null +++ b/UI/WinScreen.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://UI/WinScreenScript.gd" type="Script" id=1] + +[node name="Spatial" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} +labelPath = NodePath("MarginContainer/VBoxContainer/PlayerWon") + +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[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 +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_right = 1024.0 +margin_bottom = 404.0 +rect_min_size = Vector2( 0, 150 ) +align = 1 +valign = 1 diff --git a/UI/WinScreenScript.gd b/UI/WinScreenScript.gd new file mode 100644 index 0000000..0e8dae2 --- /dev/null +++ b/UI/WinScreenScript.gd @@ -0,0 +1,22 @@ +extends Control + +export(NodePath) var labelPath + +#signal player_win(player_id) + +var _playerWonLabel + +# 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) + + +func _win_message(player_id): + _playerWonLabel.text = "test" + + #print("game won!") + #print(player_id)