Sentry Gun Enemy

This enemy looks for you and if you come into its range it shoots at
you. If you leave its range it stops. I wanted it to alternate sides,
but I couldn't figure it out. Its probably better this way though.