I want one of my enemy moves only at borders of surrounded area. My enemy must touch any side of border and continuously move around its limit.
Surrounded area is completely dynamic as per main player take its movement.
Following image give you more idea regarding this. I have to move on dotted path and path is dynamic.
I need some suggestion about this type of implementation.