win screen basics
This commit is contained in:
parent
8afde2fa4b
commit
7d4d0254d9
37
UI/WinScreen.tscn
Normal file
37
UI/WinScreen.tscn
Normal file
@ -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
|
22
UI/WinScreenScript.gd
Normal file
22
UI/WinScreenScript.gd
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user