24 lines
511 B
GDScript3
Raw Normal View History

2020-01-26 16:31:20 +01:00
extends NPC
var _interactArea: Area
func _ready():
#Logger.set_logger_level(Logger.LOG_LEVEL_FINE)
# setup collisions with player
var _interactArea = get_node("InteractArea") as Area
assert(null != _interactArea)
_interactArea.connect("area_entered", self, "_on_area_entered")
func _process(_delta):
# TODO: movement
#if current_target: # should not be needed -> handled per navigation path
pass
func _on_area_entered (area: Area):
if area.is_in_group("FactoryEntry"):
# TODO: despawn
pass