There seems to be a problem with the below code:
Especially the Using statements at the top returns errors:
Code:
using UnityEngine;
using Opsive.Shared.Inventory;
using Opsive.Shared.Events;
public class MyObject : MonoBehaviour
{
public void Awake()
{
EventHandler.RegisterEvent<IItemIdentifier, int>(gameObject, "OnInventoryAdjustItemIdentifierAmount", OnAdjustItemIdentifierAmount);
}
/// <summary>
/// The specified ItemIdentifier has changed values.
/// </summary>
/// <param name="itemIdentifier">The ItemIdentifier that has been used.</param>
/// <param name="remaining">The remaining amount of the specified ItemIdentifier.</param>
private void OnInventoryAdjustItemIdentifierAmount(IItemIdentifier itemIdentifier, int remaining)
{
Debug.Log("The inventory used " + itemIdentifier + ", " + remaining + " is remaining.");
}
public void OnDestroy()
{
EventHandler. UnregisterEvent <IItemIdentifier, int>(gameObject, "OnInventoryAdjustItemIdentifierAmount", OnAdjustItemIdentifierAmount);
}
}
Especially the Using statements at the top returns errors:
Code:
using Opsive.Shared.Inventory;
using Opsive.Shared.Events;