Fix des timer attaque + ajout tableau slot attaque
This commit is contained in:
parent
e9952f4ec9
commit
4040779923
11 changed files with 155 additions and 106 deletions
14
scripts/Instrument/fusil_pompe.gd
Normal file
14
scripts/Instrument/fusil_pompe.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Area2D
|
||||
|
||||
var timer = 0.0
|
||||
var cooldown = 0.35
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
timer += delta
|
||||
if timer >= cooldown:
|
||||
queue_free()
|
||||
|
||||
func Collision(body: Node2D) -> void:
|
||||
|
||||
if body.is_in_group("Enemies") :
|
||||
queue_free()
|
Loading…
Add table
Add a link
Reference in a new issue