Jam10/Scripts/Units/NPCExample.gd

9 lines
147 B
GDScript3
Raw Normal View History

2023-01-26 18:25:40 +00:00
extends NPCUnit
func before_tick():
if scene.rng.randf() < 0.5:
facing = Constants.Direction.RIGHT
else:
facing = Constants.Direction.LEFT