示例#1
0
 internal static void InstallEvents()
 {
     SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke());
     SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke());
     SteamServersDisconnected_t.Install(x => OnSteamServersDisconnected?.Invoke());
     ClientGameServerDeny_t.Install(x => OnClientGameServerDeny?.Invoke());
     LicensesUpdated_t.Install(x => OnLicensesUpdated?.Invoke());
     ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse));
     MicroTxnAuthorizationResponse_t.Install(x => OnMicroTxnAuthorizationResponse?.Invoke(x.AppID, x.OrderID, x.Authorized != 0));
     GameWebCallback_t.Install(x => OnGameWebCallback?.Invoke(x.URL));
 }
示例#2
0
        internal static void InstallEvents()
        {
            SteamInventory.InstallEvents();
            SteamNetworkingSockets.InstallEvents(true);
            SteamUGC.InstallEvents(true);

            ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse), true);
            SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke(), true);
            SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke(x.Result, x.StillRetrying), true);
            SteamServersDisconnected_t.Install(x => OnSteamServersDisconnected?.Invoke(x.Result), true);
        }
 internal static void InstallEvents()
 {
     SteamInventory.InstallEvents();
     ValidateAuthTicketResponse_t.Install((ValidateAuthTicketResponse_t x) => {
         Action <SteamId, SteamId, AuthResponse> onValidateAuthTicketResponse = SteamServer.OnValidateAuthTicketResponse;
         if (onValidateAuthTicketResponse != null)
         {
             onValidateAuthTicketResponse(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse);
         }
         else
         {
         }
     }, true);
     SteamServersConnected_t.Install((SteamServersConnected_t x) => {
         Action onSteamServersConnected = SteamServer.OnSteamServersConnected;
         if (onSteamServersConnected != null)
         {
             onSteamServersConnected();
         }
         else
         {
         }
     }, true);
     SteamServerConnectFailure_t.Install((SteamServerConnectFailure_t x) => {
         Action <Result, bool> onSteamServerConnectFailure = SteamServer.OnSteamServerConnectFailure;
         if (onSteamServerConnectFailure != null)
         {
             onSteamServerConnectFailure(x.Result, x.StillRetrying);
         }
         else
         {
         }
     }, true);
     SteamServersDisconnected_t.Install((SteamServersDisconnected_t x) => {
         Action <Result> onSteamServersDisconnected = SteamServer.OnSteamServersDisconnected;
         if (onSteamServersDisconnected != null)
         {
             onSteamServersDisconnected(x.Result);
         }
         else
         {
         }
     }, true);
 }
	void OnSteamServerConnectFailure(SteamServerConnectFailure_t pCallback) {
		Debug.Log("[" + SteamServerConnectFailure_t.k_iCallback + " - SteamServerConnectFailure] - " + pCallback.m_eResult);
	}
示例#5
0
 internal static void InstallEvents()
 {
     ValidateAuthTicketResponse_t.Install(x => OnValidateAuthTicketResponse?.Invoke(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse), true);
     SteamServersConnected_t.Install(x => OnSteamServersConnected?.Invoke(), true);
     SteamServerConnectFailure_t.Install(x => OnSteamServerConnectFailure?.Invoke(), true);
 }
	//-----------------------------------------------------------------------------
	// Purpose: Called when an attempt to login to Steam fails
	//-----------------------------------------------------------------------------
	void OnSteamServersConnectFailure(SteamServerConnectFailure_t pConnectFailure) {
		m_bConnectedToSteam = false;
		Debug.Log("SpaceWarServer failed to connect to Steam");
	}
示例#7
0
        /// <summary>
        /// From Spacewar:
        /// Called when an attempt to login to Steam fails.
        /// </summary>
        /// <param name="callback"></param>
        void OnSteamServersConnectFailure(SteamServerConnectFailure_t callback)
        {
            _SteamConnected = false;

            Debug.LogWarning("We were unable to connect to Steams' Servers");
        }
 internal static void InstallEvents()
 {
     SteamServersConnected_t.Install((SteamServersConnected_t x) => {
         Action onSteamServersConnected = SteamUser.OnSteamServersConnected;
         if (onSteamServersConnected != null)
         {
             onSteamServersConnected();
         }
         else
         {
         }
     }, false);
     SteamServerConnectFailure_t.Install((SteamServerConnectFailure_t x) => {
         Action onSteamServerConnectFailure = SteamUser.OnSteamServerConnectFailure;
         if (onSteamServerConnectFailure != null)
         {
             onSteamServerConnectFailure();
         }
         else
         {
         }
     }, false);
     SteamServersDisconnected_t.Install((SteamServersDisconnected_t x) => {
         Action onSteamServersDisconnected = SteamUser.OnSteamServersDisconnected;
         if (onSteamServersDisconnected != null)
         {
             onSteamServersDisconnected();
         }
         else
         {
         }
     }, false);
     ClientGameServerDeny_t.Install((ClientGameServerDeny_t x) => {
         Action onClientGameServerDeny = SteamUser.OnClientGameServerDeny;
         if (onClientGameServerDeny != null)
         {
             onClientGameServerDeny();
         }
         else
         {
         }
     }, false);
     LicensesUpdated_t.Install((LicensesUpdated_t x) => {
         Action onLicensesUpdated = SteamUser.OnLicensesUpdated;
         if (onLicensesUpdated != null)
         {
             onLicensesUpdated();
         }
         else
         {
         }
     }, false);
     ValidateAuthTicketResponse_t.Install((ValidateAuthTicketResponse_t x) => {
         Action <SteamId, SteamId, AuthResponse> onValidateAuthTicketResponse = SteamUser.OnValidateAuthTicketResponse;
         if (onValidateAuthTicketResponse != null)
         {
             onValidateAuthTicketResponse(x.SteamID, x.OwnerSteamID, x.AuthSessionResponse);
         }
         else
         {
         }
     }, false);
     MicroTxnAuthorizationResponse_t.Install((MicroTxnAuthorizationResponse_t x) => {
         Action <AppId, ulong, bool> onMicroTxnAuthorizationResponse = SteamUser.OnMicroTxnAuthorizationResponse;
         if (onMicroTxnAuthorizationResponse != null)
         {
             onMicroTxnAuthorizationResponse(x.AppID, x.OrderID, x.Authorized != 0);
         }
         else
         {
         }
     }, false);
     GameWebCallback_t.Install((GameWebCallback_t x) => {
         Action <string> onGameWebCallback = SteamUser.OnGameWebCallback;
         if (onGameWebCallback != null)
         {
             onGameWebCallback(x.URL);
         }
         else
         {
         }
     }, false);
     GetAuthSessionTicketResponse_t.Install((GetAuthSessionTicketResponse_t x) => {
         Action <GetAuthSessionTicketResponse_t> onGetAuthSessionTicketResponse = SteamUser.OnGetAuthSessionTicketResponse;
         if (onGetAuthSessionTicketResponse != null)
         {
             onGetAuthSessionTicketResponse(x);
         }
         else
         {
         }
     }, false);
 }