Package apple.gamekit

Class GKMatch

  • All Implemented Interfaces:
    NSObject

    public class GKMatch
    extends NSObject
    GKMatch represents an active networking sessions between players. It handles network communications and can report player connection status. All matches are created by a GKMatchmaker.
    • Constructor Detail

      • GKMatch

        protected GKMatch​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static GKMatch alloc()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • chooseBestHostPlayerWithCompletionHandler

        @Deprecated
        public void chooseBestHostPlayerWithCompletionHandler​(GKMatch.Block_chooseBestHostPlayerWithCompletionHandler completionHandler)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing**
      • chooseBestHostingPlayerWithCompletionHandler

        public void chooseBestHostingPlayerWithCompletionHandler​(GKMatch.Block_chooseBestHostingPlayerWithCompletionHandler completionHandler)
        Choose the best host from among the connected players using gathered estimates for bandwidth and packet loss. This is intended for applications that wish to implement a client-server model on top of the match. The returned player ID will be nil if the best host cannot currently be determined (e.g. players are still connecting).
      • delegate

        public GKMatchDelegate delegate()
        all the GKPlayers in the match
      • disconnect

        public void disconnect()
        Disconnect the match. This will show all other players in the match that the local player has disconnected. This should be called before releasing the match instance.
      • expectedPlayerCount

        public long expectedPlayerCount()
      • playerIDs

        @Deprecated
        public NSArray<java.lang.String> playerIDs()
        Deprecated.
        NSStrings of player identifiers in the match
      • rematchWithCompletionHandler

        public void rematchWithCompletionHandler​(GKMatch.Block_rematchWithCompletionHandler completionHandler)
        Auto-matching to recreate a previous peer-to-peer match that became disconnected. A new match with the same set of players will be returned by the completion handler. All players should perform this when the match has ended for auto-matching to succeed. Error will be nil on success. Possible reasons for error: 1. Communications failure 2. Timeout
      • sendDataToPlayersDataModeError

        public boolean sendDataToPlayersDataModeError​(NSData data,
                                                      NSArray<? extends GKPlayer> players,
                                                      long mode,
                                                      org.moe.natj.general.ptr.Ptr<NSError> error)
        Asynchronously send data to one or more GKPlayers. Returns YES if delivery started, NO if unable to start sending and error will be set.
      • sendDataToPlayersWithDataModeError

        @Deprecated
        public boolean sendDataToPlayersWithDataModeError​(NSData data,
                                                          NSArray<java.lang.String> playerIDs,
                                                          long mode,
                                                          org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        This method is obsolete. It will never be invoked and its implementation does nothing**
      • sendDataToAllPlayersWithDataModeError

        public boolean sendDataToAllPlayersWithDataModeError​(NSData data,
                                                             long mode,
                                                             org.moe.natj.general.ptr.Ptr<NSError> error)
        Asynchronously broadcasts data to all players. Returns YES if delivery started, NO if unable to start sending and error will be set.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(GKMatchDelegate value)
        all the GKPlayers in the match
      • setDelegate

        public void setDelegate​(GKMatchDelegate value)
        all the GKPlayers in the match
      • voiceChatWithName

        public GKVoiceChat voiceChatWithName​(java.lang.String name)
        Join a named voice chat channel Will return nil if parental controls are turned on