23 lines
415 B
GDScript3
23 lines
415 B
GDScript3
|
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)
|