Trying to sort shield issues.

This commit is contained in:
Henry 2025-12-23 18:48:49 +00:00
parent a007b08b83
commit aa7cdc90d6
3 changed files with 5 additions and 2 deletions

View file

@ -50,8 +50,11 @@ func _on_player_died():
func new_game():
get_tree().call_group("enemies", "queue_free")
get_tree().call_group("enemy_bullets", "queue_free")
# get_node("player").start()
Global.score = 0
$CanvasLayer/UI.update_score(Global.score)
EventBus.initialize_shieldbar.emit()
instance = player.instantiate()
add_child(instance)
$Player.shader_active = false
@ -59,6 +62,8 @@ func new_game():
$CanvasLayer/UI.update_score(Global.score)
spawn_enemies()
playing = true
print("New game started!")
func _input(EventInput):

View file

@ -28,7 +28,6 @@ func _ready():
# start()
func start():
monitoring = true
print(shield)
$Ship.frame = 1
$Ship.show()

1
ui.gd
View file

@ -36,4 +36,3 @@ func _on_initialize_shieldbar():
tween.tween_property(shield_bar, "value", 100, .25).set_trans(Tween.TRANS_LINEAR)
await tween.finished
print_debug("Tweens played!")
return