grounders-slowjam-2024/camera/PersonalUI.gd

20 lines
414 B
GDScript3
Raw Normal View History

2024-06-03 11:05:52 -06:00
extends Control
@onready var level := Level.find_level(self)
const personal_msg_1 := "You're not it, run!"
const personal_msg_2 := "You're it, run!"
func get_player() -> Player:
return owner.get_parent()
func _ready():
level.state_enter_tagger_change.connect(tagger_change)
func tagger_change(next: Player):
if get_player() == next:
$Label.text = personal_msg_2
else:
$Label.text = personal_msg_1