Instance Method

register(_:)

Register a listener for a particular event.

Declaration

func register(_ listener: GKLocalPlayerListener)

Parameters

listener

The GKLocalPlayerListener object containing the selector information to listen to.

Discussion

Only register a listener a single time. Registering a listener multiple times will result in undefined behavior.

See Also

Registering Listeners

func unregisterAllListeners()

Unregister all listeners in your game.

func unregisterListener(GKLocalPlayerListener)

Unregister a specific listener.