handles enemy respawning properly
This commit is contained in:
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user