Unity-Technologies / UnityPlayground

A collection of simple scripts to create 2D physics game, intended for giving workshops to a young audience
MIT License
870 stars 164 forks source link

Adding a Patrol script to move enemies back and forth. #9

Closed sophiaaar closed 7 years ago

sophiaaar commented 7 years ago

This script is similar to Wander, but the gameObject just moves back and forth, changing direction at an interval set in the Inspector.

This script could be used for enemies in a 2D platformer, for example.