GKAgent2D
An agent that operates in a two-dimensional space.
Declaration
class GKAgent2DOverview
Agents are game entities that move according to realistic constraints and whose behavior is determined by goals that motivate movement. The general functionality of an agent is defined by the abstract superclass GKAgent; however, you use instances of the GKAgent2D class to implement agent-based gameplay in a 2D game (or in a 3D game where gameplay-relevant movement is restricted to two dimensions).
To learn more about using goals and agents, see Agents, Goals, and Behaviors in GameplayKit Programming Guide.