第一次提交作业
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
extends Label
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
# Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
func _ready():
|
||||
visible = false
|
||||
%tip.body_entered.connect(_on_body_entered)
|
||||
|
||||
func _on_body_entered(body: Node2D):
|
||||
if body.has_method("take_damage"):
|
||||
visible = true
|
||||
await get_tree().create_timer(3.0).timeout
|
||||
visible = false
|
||||
Reference in New Issue
Block a user