2025-01-24 22:51:25 +01:00
|
|
|
extends Area2D
|
2025-01-24 18:45:09 +01:00
|
|
|
|
2025-01-24 22:51:25 +01:00
|
|
|
var timer = 0.0
|
2025-01-25 01:44:33 +01:00
|
|
|
var cooldown = 0.33
|
2025-01-24 18:45:09 +01:00
|
|
|
|
|
|
|
func _process(delta: float) -> void:
|
2025-01-24 22:51:25 +01:00
|
|
|
timer += delta
|
|
|
|
if timer >= cooldown:
|
|
|
|
queue_free()
|
2025-01-24 18:45:09 +01:00
|
|
|
|
|
|
|
|
2025-01-24 22:51:25 +01:00
|
|
|
func Collision(body: Node2D) -> void:
|
|
|
|
if body.is_in_group("Enemies") :
|
2025-01-25 01:44:33 +01:00
|
|
|
body.take_damage(2)
|