An agent that operates in a two-dimensional space.
- iOS 9.0+
- macOS 10.11+
- tvOS 9.0+
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).