17 lines
285 B
GDScript3
17 lines
285 B
GDScript3
|
extends StaticBody2D
|
||
|
|
||
|
export var health : int = 100
|
||
|
export var reverse_direction: bool = false
|
||
|
export var damage : int = 5
|
||
|
|
||
|
func _process(delta):
|
||
|
if health <= 0 and $Collision.disabled == false:
|
||
|
$Collision.disabled = true
|
||
|
_die()
|
||
|
|
||
|
func stomped_on_head():
|
||
|
pass
|
||
|
|
||
|
func _die():
|
||
|
pass
|