feat: 1.添加统计面板, 2. 游戏暂停标志 Global.paused

This commit is contained in:
luke358
2026-05-20 21:05:04 +08:00
parent 651eaf71ee
commit 4a3cd81ff7
13 changed files with 464 additions and 338 deletions
+8 -2
View File
@@ -18,6 +18,9 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if Global.game_paused:
return
if not can_move:
return
@@ -44,8 +47,6 @@ func get_move_direction() -> Vector2:
func update_rotate() -> void:
print("11111111")
if !is_instance_valid(Global.player):
return
@@ -73,6 +74,11 @@ func reset_knockback() -> void:
knockback_dir = Vector2.ZERO
knockback_power = 0
func destroy_enemy() -> void:
can_move = false
anim_player.play("die")
await anim_player.animation_finished
queue_free()
func _on_knockback_timer_timeout() -> void:
reset_knockback()
+3
View File
@@ -18,6 +18,9 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if Global.game_paused:
return
if enemy == null:
return