Esempio n. 1
0
 internal LeaderboardEntry(ulong steamIDUser, int globalRank, int score, List<int> scoreDetails)
 {
   this._id = new SteamID(steamIDUser);
   this._rank = globalRank;
   this._score = score;
   this._scoreDetails = scoreDetails;
 }
Esempio n. 2
0
 public InGamePurchase NewPurchase(bool useTestMode, string webAPIKey, ulong orderID)
 {
   if (this._regionInfo == null)
   {
     this._steamID = new SteamID(InGamePurchasing.SteamUnityAPI_SteamUser_GetSteamID(this._user));
     string currentGameLanguage = InGamePurchasing.SteamUnityAPI_SteamApps_GetCurrentGameLanguage(this._apps);
     foreach (CultureInfo cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
     {
       if (cultureInfo.DisplayName.Equals(currentGameLanguage, StringComparison.OrdinalIgnoreCase) || cultureInfo.EnglishName.Equals(currentGameLanguage, StringComparison.OrdinalIgnoreCase) || cultureInfo.NativeName.Equals(currentGameLanguage, StringComparison.OrdinalIgnoreCase))
       {
         this._language = cultureInfo.TwoLetterISOLanguageName;
         break;
       }
     }
     this.FetchRegionInfo(useTestMode, webAPIKey);
   }
   return new InGamePurchase(useTestMode, webAPIKey, orderID);
 }
Esempio n. 3
0
File: User.cs Progetto: Zeludon/FEZ
 public void AdvertiseGame(SteamID gameServerSteamID, IPAddress ip, ushort port)
 {
   byte[] addressBytes = ip.GetAddressBytes();
   uint serverIP = (uint) ((int) addressBytes[0] << 24 | (int) addressBytes[1] << 16 | (int) addressBytes[2] << 8) | (uint) addressBytes[3];
   User.SteamUnityAPI_SteamUser_AdvertiseGame(this._user, gameServerSteamID.ToUInt64(), serverIP, port);
 }
Esempio n. 4
0
File: User.cs Progetto: Zeludon/FEZ
 public EUserHasLicenseForAppResult UserHasLicenseForApp(SteamID steamID, uint appID)
 {
   return User.SteamUnityAPI_SteamUser_UserHasLicenseForApp(this._user, steamID.ToUInt64(), appID);
 }
Esempio n. 5
0
File: User.cs Progetto: Zeludon/FEZ
 public bool InitiateClientAuthentication(out byte[] authTicket, SteamID steamIDServer, IPAddress ipServer, ushort serverPort, bool isSecure)
 {
   byte[] addressBytes = ipServer.GetAddressBytes();
   this._serverIP = (uint) ((int) addressBytes[0] << 24 | (int) addressBytes[1] << 16 | (int) addressBytes[2] << 8) | (uint) addressBytes[3];
   this._serverPort = serverPort;
   byte[] authTicket1 = new byte[2048];
   int length = User.SteamUnityAPI_SteamUser_InitiateGameConnection(this._user, authTicket1, 2048, steamIDServer.ToUInt64(), this._serverIP, this._serverPort, isSecure);
   if (length > 0)
   {
     authTicket = new byte[length];
     for (int index = 0; index < length; ++index)
       authTicket[index] = authTicket1[index];
     return true;
   }
   else
   {
     authTicket = (byte[]) null;
     return false;
   }
 }
Esempio n. 6
0
 public void SendP2PPacket(SteamID steamID, byte[] data, EP2PSend sendType, int channel = 0)
 {
   IntPtr num = Marshal.AllocHGlobal(data.Length);
   Marshal.Copy(data, 0, num, data.Length);
   Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), num, (uint) data.Length, (byte) sendType, channel);
   Marshal.FreeHGlobal(num);
 }
Esempio n. 7
0
 public void SendP2PPacket(SteamID steamID, string data, EP2PSend sendType, int channel = 0)
 {
   Networking.SteamUnityAPI_SteamNetworking_SendP2PPacket(this._networking, steamID.ToUInt64(), Marshal.StringToHGlobalAnsi(data), (uint) data.Length, (byte) sendType, channel);
 }
Esempio n. 8
0
 public void CloseP2PSession(SteamID steamID, int channel)
 {
   Networking.SteamUnityAPI_SteamNetworking_CloseP2PChannel(this._networking, steamID.ToUInt64(), channel);
 }
Esempio n. 9
0
 public void CloseP2PSession(SteamID steamID)
 {
   Networking.SteamUnityAPI_SteamNetworking_CloseP2PSession(this._networking, steamID.ToUInt64());
 }