bodypartfighter/UI/WinScreenScript.gd

24 lines
447 B
GDScript3
Raw Normal View History

2020-02-01 13:26:50 +01:00
extends Control
export(NodePath) var labelPath
2020-02-01 15:09:11 +01:00
export(NodePath) var continuePath
2020-02-01 13:26:50 +01:00
2020-02-01 15:09:11 +01:00
signal start_fight()
2020-02-01 13:26:50 +01:00
var _playerWonLabel
2020-02-01 15:09:11 +01:00
var _continueButton
2020-02-01 13:26:50 +01:00
func _ready():
_playerWonLabel = get_node(labelPath) as Label
2020-02-01 15:09:11 +01:00
_continueButton = get_node(continuePath) as Label
func set_win_message(player_id):
_playerWonLabel.text = "Player " + str(player_id + 1) + " is victorious!"
2020-02-01 13:26:50 +01:00
2020-02-01 15:09:11 +01:00
func _on_Continue_pressed():
print("test2")
2020-02-01 13:26:50 +01:00
2020-02-01 15:09:11 +01:00
emit_signal("start_fight")