mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-04-16 14:22:27 +03:00
SteamInventory
This commit is contained in:
parent
a59e8f9134
commit
67170a2da4
@ -38,6 +38,7 @@ namespace Steamworks
|
|||||||
SteamFriends.InstallEvents();
|
SteamFriends.InstallEvents();
|
||||||
SteamScreenshots.InstallEvents();
|
SteamScreenshots.InstallEvents();
|
||||||
SteamUserStats.InstallEvents();
|
SteamUserStats.InstallEvents();
|
||||||
|
SteamInventory.InstallEvents();
|
||||||
|
|
||||||
RunCallbacksAsync();
|
RunCallbacksAsync();
|
||||||
}
|
}
|
||||||
|
37
Facepunch.Steamworks/SteamInventory.cs
Normal file
37
Facepunch.Steamworks/SteamInventory.cs
Normal 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user