Fix brick throwing, add enemy death

This commit is contained in:
2025-01-05 06:41:53 +01:00
parent 5b558f9c3b
commit 697a9b7deb
44 changed files with 1061 additions and 7 deletions

View File

@@ -32,7 +32,7 @@ func throw_brick() -> void:
var brick_instance: Node2D = brick_scene.instantiate()
var brick: BulletComponent = brick_instance.get_node("BulletComponent")
brick_instance.position = player_controller.position
brick.direction = Vector2.RIGHT if player_controller.velocity.x >= 0.0 else Vector2.LEFT
brick.direction = player_controller.last_direction
get_tree().current_scene.add_child(brick_instance)
can_throw = false