Flopsy/objects/characters/monsters/static_monster.gd

17 lines
285 B
GDScript3
Raw Permalink Normal View History

2022-07-19 18:11:23 +02:00
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