This commit is contained in:
MarkYabut committed 2026-10-06 20:58:01 -04:00
1 parent 8768909429
commit 3607e63548
9 files changed
+138 -15

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
class_name Bullet extends Area2D
var speed := 700
signal bulletDamageSignal(body, bullet)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
position += transform.x * speed * delta
func _on_body_entered(body: Node2D) -> void:
print("Bullet hit something " + body.to_string())
bulletDamageSignal.emit(body, self)