chore: run gdformat on all gdscript files
This commit is contained in:
@@ -6,32 +6,40 @@ extends Control
|
||||
|
||||
var debug_stats: Dictionary = {}
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
stats_container.visible = false
|
||||
panel_container.visible = false
|
||||
GlobalConst.sig_debug_stats_set.connect(set_debug_stat)
|
||||
|
||||
|
||||
func toggle():
|
||||
panel_container.visible = !panel_container.visible
|
||||
|
||||
|
||||
func _on_zoom_check_toggled(toggled_on: bool) -> void:
|
||||
GlobalConst.sig_debug_camera_zoom.emit(toggled_on)
|
||||
|
||||
|
||||
func _on_god_mode_check_toggled(toggled_on: bool) -> void:
|
||||
GlobalConst.sig_debug_god_mode.emit(toggled_on)
|
||||
|
||||
|
||||
func _on_enemy_god_mode_check_toggled(toggled_on: bool) -> void:
|
||||
GlobalConst.sig_debug_enemy_god_mode.emit(toggled_on)
|
||||
|
||||
|
||||
func _on_stats_check_toggled(toggled_on: bool) -> void:
|
||||
stats_container.visible = toggled_on
|
||||
|
||||
|
||||
func set_debug_stat(key: String, value: String):
|
||||
if key == "":
|
||||
debug_stats.erase(key)
|
||||
debug_stats[key] = value
|
||||
update_debug_stats()
|
||||
|
||||
|
||||
func update_debug_stats() -> void:
|
||||
for child in stats_container.get_children():
|
||||
child.queue_free()
|
||||
|
@@ -9,6 +9,7 @@ extends Node2D
|
||||
|
||||
var enemy_scene = preload("res://scenes/enemies/enemy.tscn")
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
timer.wait_time = spawn_rate / 1
|
||||
timer.start()
|
||||
@@ -23,7 +24,8 @@ func _on_timer_timeout() -> void:
|
||||
new_enemy.position = target.position + Vector2(50, 50)
|
||||
new_enemy.target = target
|
||||
add_child(new_enemy)
|
||||
|
||||
|
||||
|
||||
func _on_stop_spawning(val: bool):
|
||||
if val:
|
||||
timer.stop()
|
||||
|
@@ -5,6 +5,7 @@ extends Control
|
||||
@onready var player_ui: PlayerUI = $CanvasLayer/PlayerUI
|
||||
@onready var debug_ui: DebugUI = $CanvasLayer/DebugUI
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
pause_ui.visible = false
|
||||
player_ui.visible = true
|
||||
|
@@ -1,9 +1,11 @@
|
||||
class_name PauseUI
|
||||
extends Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func toggle_pause_ui() -> void:
|
||||
if visible:
|
||||
visible = false
|
||||
@@ -18,7 +20,7 @@ func _on_resume_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_options_button_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_exit_button_pressed() -> void:
|
||||
@@ -26,4 +28,4 @@ func _on_exit_button_pressed() -> void:
|
||||
|
||||
|
||||
func _on_new_game_btuton_pressed() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
@@ -3,5 +3,6 @@ extends Control
|
||||
|
||||
@onready var hp_bar: ProgressBar = $CenterContainer/ProgressBar
|
||||
|
||||
|
||||
func set_hp(value: float):
|
||||
hp_bar.value = value
|
||||
|
Reference in New Issue
Block a user