예제 #1
0
        public void Initialize()
        {
            try
            {
                active = SteamAPI.Init();
                Console.WriteLine("Steam logged on: " + SteamUser.BLoggedOn().ToString());
                if (active)
                {
                    Console.WriteLine("Initializing GalaxySDK");
                    GalaxyInstance.Init(new InitParams("48767653913349277", "58be5c2e55d7f535cf8c4b6bbc09d185de90b152c8c42703cc13502465f0d04a", "."));
                    encryptedAppTicketResponse = CallResult <EncryptedAppTicketResponse_t> .Create(onEncryptedAppTicketResponse);

                    galaxyAuthListener        = new GalaxyHelper.AuthListener(onGalaxyAuthSuccess, onGalaxyAuthFailure, onGalaxyAuthLost);
                    galaxyStateChangeListener = new GalaxyHelper.OperationalStateChangeListener(onGalaxyStateChange);
                    Console.WriteLine("Requesting Steam app ticket");
                    SteamAPICall_t handle = SteamUser.RequestEncryptedAppTicket(new byte[0], 0);
                    encryptedAppTicketResponse.Set(handle);
                    ConnectionProgress++;
                }
            }
            catch (Exception value)
            {
                Console.WriteLine(value);
                active             = false;
                ConnectionFinished = true;
            }
            if (active)
            {
                gameOverlayActivated = Callback <GameOverlayActivated_t> .Create(onGameOverlayActivated);

                gamepadTextInputDismissed = Callback <GamepadTextInputDismissed_t> .Create(OnKeyboardDismissed);
            }
        }
 // Token: 0x06000027 RID: 39 RVA: 0x000027A8 File Offset: 0x000009A8
 public static void initialize()
 {
     if (!GOGHelper.gogEnabled)
     {
         return;
     }
     try
     {
         GalaxyInstance.Init("8767653913349277", "58be5c2e55d7f535cf8c4b6bbc09d185de90b152c8c42703cc13502465f0d04a");
         GalaxyInstance.User().SignIn();
     }
     catch (Exception)
     {
     }
 }
    /* Initializes GalaxyPeer instance
     * NOTE: Even if Init will throw exepction Apps interface will still be available.
     * If you want to use Apps interface in your game make sure that shutdown is NOT called when Init throws an exception.*/
    private void Init()
    {
        InitParams initParams = new InitParams(clientID, clientSecret);

        Debug.Log("Initializing GalaxyPeer instance...");
        try
        {
            GalaxyInstance.Init(initParams);
            galaxyFullyInitialized = true;
        }
        catch (GalaxyInstance.Error e)
        {
            Debug.LogWarning("Init failed for reason " + e);
            galaxyFullyInitialized = false;
        }
    }
예제 #4
0
 public void Initialize()
 {
     try
     {
         GalaxyInstance.Init(new InitParams("48767653913349277", "58be5c2e55d7f535cf8c4b6bbc09d185de90b152c8c42703cc13502465f0d04a"));
         authListener        = new AuthListener(onGalaxyAuthSuccess, onGalaxyAuthFailure, onGalaxyAuthLost);
         stateChangeListener = new OperationalStateChangeListener(onGalaxyStateChange);
         GalaxyInstance.User().SignInGalaxy(requireOnline: true);
         active = true;
         ConnectionProgress++;
     }
     catch (Exception value)
     {
         Console.WriteLine(value);
         ConnectionFinished = true;
     }
 }