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

14 lines
238 B
GDScript3
Raw Normal View History

extends Area2D
var timer = 0.0
2025-01-25 01:44:33 +01:00
var cooldown = 0.3
func _process(delta: float) -> void:
timer += delta
if timer >= cooldown:
queue_free()
func Collision(body: Node2D) -> void:
if body.is_in_group("Enemies") :
2025-01-25 01:44:33 +01:00
body.take_damage(3)