第一次提交作业
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
extends Label
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
# 等主角就绪后连接
|
||||
var player = get_tree().get_first_node_in_group("player")
|
||||
if player:
|
||||
player.died.connect(_on_player_died)
|
||||
|
||||
func _on_player_died():
|
||||
visible = true
|
||||
text = "游戏结束"
|
||||
print("游戏结束")
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
Reference in New Issue
Block a user