code-game-jam-drop-plafond-.../scripts/Instrument/onde.gd

15 lines
240 B
GDScript3
Raw Normal View History

extends Area2D
2025-01-24 18:45:09 +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:
timer += delta
if timer >= cooldown:
queue_free()
2025-01-24 18:45:09 +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)