make projectiles get destroyed when colliding with player

This commit is contained in:
2025-02-25 04:05:40 +10:00
parent 05f2a657f3
commit 2322d8ff62
5 changed files with 15 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ var _swoop_effect_timer: float
func _ready() -> void:
Debugger.add_event("attacked")
attacked.connect(func() -> void: Debugger.event_emitted("attacked", []))
body_entered.connect(_on_body_entered)
area_entered.connect(_on_area_entered)
position.y = Projectile.HEIGHT
_set_collision_size(_attack_radius)
@@ -159,7 +159,7 @@ func _set_collision_size(radius: float) -> void:
_swoop_mesh.height = radius
func _on_body_entered(node: Node3D) -> void:
func _on_area_entered(node: Node3D) -> void:
if _hit_window_timer <= 0:
return

View File

@@ -1,7 +1,7 @@
class_name PlayerMovement
extends RefCounted
@export var _move_speed: float = 10
@export var _move_speed: float = 8
@export var _move_acceleration: float = 100
@export var _move_deceleration: float = 50