Jam10/Scripts/Units/NPCExample.gd

11 lines
170 B
GDScript3
Raw Normal View History

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