handles enemy respawning properly

This commit is contained in:
Patrick Nueser
2024-06-28 16:12:11 +02:00
parent 1e4be7ba8d
commit 3cf084e69b
17 changed files with 1342 additions and 21 deletions

View File

@ -5,11 +5,11 @@ signal shield_changed
@onready var screensize = get_viewport_rect().size
@export var speed = 150
@export var cooldown = 0.25
@export var bullet_scene: PackedScene
@export var speed: int = 150
@export var cooldown: float = 0.25
@export var bullet_scene:PackedScene
@export var max_shield = 10
@export var max_shield: float = 10.0
var shield = max_shield:
set = set_shield
@ -66,11 +66,11 @@ func _on_gun_cooldown_timeout():
func _on_player_area_entered(area):
if area.is_in_group("enemies"):
area.explode()
shield -= max_shield / 2 # Replace with function body.
shield -= max_shield / 2.0 # Replace with function body.
func _on_area_entered(area):
if area.is_in_group("enemies"):
area.explode()
shield -= max_shield / 2 # Replace with function body.
shield -= max_shield / 2.0 # Replace with function body.