Trying to sort shield issues.
This commit is contained in:
parent
a007b08b83
commit
aa7cdc90d6
3 changed files with 5 additions and 2 deletions
5
main.gd
5
main.gd
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ func _ready():
|
|||
# start()
|
||||
|
||||
func start():
|
||||
monitoring = true
|
||||
print(shield)
|
||||
$Ship.frame = 1
|
||||
$Ship.show()
|
||||
|
|
|
|||
1
ui.gd
1
ui.gd
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue