feat: 1.添加统计面板, 2. 游戏暂停标志 Global.paused
This commit is contained in:
@@ -8,12 +8,22 @@ class_name Arena
|
||||
@export var critical_color: Color
|
||||
@export var hp_color: Color
|
||||
|
||||
@onready var wave_index_label: Label = %WaveIndexLabel
|
||||
@onready var wave_time_label: Label = %WaveTimeLabel
|
||||
@onready var spawner: Spawner = $Spawner
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
Global.player = player
|
||||
Global.on_create_block_text.connect(_on_create_block_text)
|
||||
Global.on_create_damage_text.connect(_on_create_damage_text)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if Global.game_paused:
|
||||
return
|
||||
wave_index_label.text = spawner.get_wave_text()
|
||||
wave_time_label.text = spawner.get_wave_timer_text()
|
||||
|
||||
func crteat_floating_text(unit: Node2D) -> FloatingText:
|
||||
var instace := Global.FLOATING_TEXT_SCENE.instantiate() as FloatingText
|
||||
get_tree().root.add_child(instace)
|
||||
|
||||
Reference in New Issue
Block a user