SteamInventory

This commit is contained in:
Garry Newman 2019-04-27 15:55:21 +01:00
parent a59e8f9134
commit 67170a2da4
2 changed files with 38 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace Steamworks
SteamFriends.InstallEvents();
SteamScreenshots.InstallEvents();
SteamUserStats.InstallEvents();
SteamInventory.InstallEvents();
RunCallbacksAsync();
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
/// <summary>
/// Undocumented Parental Settings
/// </summary>
public static class SteamInventory
{
static ISteamInventory _internal;
internal static ISteamInventory Internal
{
get
{
if ( _internal == null )
_internal = new ISteamInventory();
return _internal;
}
}
internal static void InstallEvents()
{
new Event<SteamInventoryFullUpdate_t>( x => OnInventoryUpdated?.Invoke() );
new Event<SteamInventoryDefinitionUpdate_t>( x => OnDefinitionsUpdated?.Invoke() );
}
public static event Action OnInventoryUpdated;
public static event Action OnDefinitionsUpdated;
}
}