Ejemplo n.º 1
0
        internal GameServices Build(PlatformConfiguration configRef)
        {
            IntPtr pointer = C.GameServices_Builder_Create(SelfPtr(),
                                                           HandleRef.ToIntPtr(configRef.AsHandle()));

            if (pointer.Equals(IntPtr.Zero))
            {
                // TODO(hsakai): For now, explode noisily. In the actual plugin, this probably
                // should result in something besides an exception.
                throw new System.InvalidOperationException("There was an error creating a " +
                                                           "GameServices object. Check for log errors from GamesNativeSDK");
            }

            return(new GameServices(pointer));
        }
Ejemplo n.º 2
0
        internal GameServices Build(PlatformConfiguration configRef)
        {
            IntPtr pointer = C.GameServices_Builder_Create(SelfPtr(),
                             HandleRef.ToIntPtr(configRef.AsHandle()));

            if (pointer.Equals(IntPtr.Zero))
            {
                // TODO(hsakai): For now, explode noisily. In the actual plugin, this probably
                // should result in something besides an exception.
                throw new System.InvalidOperationException("There was an error creating a " +
                    "GameServices object. Check for log errors from GamesNativeSDK");
            }

            return new GameServices(pointer);
        }
Ejemplo n.º 3
0
        internal GooglePlayGames.Native.PInvoke.GameServices Build(PlatformConfiguration configRef)
        {
            IntPtr selfPointer = GooglePlayGames.Native.Cwrapper.Builder.GameServices_Builder_Create(base.SelfPtr(), HandleRef.ToIntPtr(configRef.AsHandle()));

            if (selfPointer.Equals(IntPtr.Zero))
            {
                throw new InvalidOperationException("There was an error creating a GameServices object. Check for log errors from GamesNativeSDK");
            }
            return(new GooglePlayGames.Native.PInvoke.GameServices(selfPointer));
        }