You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
551 B
C#

using UnityEngine;
using MalbersAnimations.Events;
using System.Collections.Generic;
namespace MalbersAnimations
{
[AddComponentMenu("Malbers/Weapons/MInventory Basic")]
public class MInventory : MonoBehaviour
{
public List<GameObject> Inventory;
public GameObjectEvent OnEquipItem;
public virtual void EquipItem(int Slot)
{
if (Slot < Inventory.Count) OnEquipItem.Invoke(Inventory[Slot]);
}
public virtual void AddItem(GameObject item) => Inventory.Add(item);
}
}