Cleanup code
This commit is contained in:
parent
16d0bc8d67
commit
ffa52c30ca
3 changed files with 2 additions and 20 deletions
|
@ -2,16 +2,6 @@ extends Area2D
|
||||||
|
|
||||||
signal enemy_entered_base(enemy)
|
signal enemy_entered_base(enemy)
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
pass # Replace with function body.
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
func _on_body_entered(body):
|
func _on_body_entered(body):
|
||||||
if body.is_in_group("Enemy"):
|
if body.is_in_group("Enemy"):
|
||||||
var enemy = body.get_parent()
|
var enemy = body.get_parent()
|
||||||
|
|
|
@ -48,8 +48,8 @@ func update_healthbar():
|
||||||
else:
|
else:
|
||||||
$EnemyBody/HealthBar.visible = true
|
$EnemyBody/HealthBar.visible = true
|
||||||
|
|
||||||
func hit(damage : int):
|
func hit(value : int):
|
||||||
health = health - damage
|
health = health - value
|
||||||
|
|
||||||
func destroy():
|
func destroy():
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
|
@ -2,14 +2,6 @@ extends Control
|
||||||
|
|
||||||
signal on_resume()
|
signal on_resume()
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready():
|
|
||||||
hide()
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
func _process(delta):
|
|
||||||
pass
|
|
||||||
|
|
||||||
func show_menu():
|
func show_menu():
|
||||||
show()
|
show()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue