SlimeoosOdyssey/godot/cultist.gd
ncusimano 2c5a328665 Resolve Conflict
Also has Cultist updates
2023-08-20 12:18:04 -06:00

24 lines
480 B
GDScript

extends SharedSlime
class_name Cultist
var victim
func _process(delta):
super._process(delta)
if task == "corrupt":
pass
# For corruption detection range.
func _on_target_radius_body_entered(body):
if body.is_class("Villager"):
victim = body
walk_speed = 2 * walk_speed
target_location_xz = victim.location_xz
task = "walk"
# For collision with other slimes.
func _on_collision_detection_body_entered(body):
if body.is_class("Villager"):
task = "corrupt"