20 lines
414 B
GDScript3
20 lines
414 B
GDScript3
|
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
|
||
|
|