make projectiles get destroyed when colliding with player
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user