Jam10/Scripts/Units/NPCExample.gd

11 lines
170 B
GDScript

extends NPCUnit
class_name NPCExample
func before_tick():
if scene.rng.randf() < 0.5:
facing = Constants.Direction.RIGHT
else:
facing = Constants.Direction.LEFT