projectEli/Assets/NeoFPS/Core/Inventory/IQuickSlots.cs

38 lines
1.0 KiB
C#
Raw Normal View History

2022-11-07 01:28:33 +00:00
using UnityEngine;
using UnityEngine.Events;
namespace NeoFPS
{
public interface IQuickSlots
{
event UnityAction<int, IQuickSlotItem> onSelectionChanged;
event UnityAction<int, IQuickSlotItem> onSlotItemChanged;
event UnityAction<IQuickSlotItem> onItemDropped;
void SetSlotItem (int slot, IQuickSlotItem item);
IQuickSlotItem GetSlotItem (int slot);
void ClearSlots ();
int numSlots { get; }
IQuickSlotItem selected { get; }
bool SelectStartingSlot ();
bool SelectSlot (int slot);
bool SelectNextSlot ();
bool SelectPreviousSlot ();
bool LockSelectionToSlot(int index, Object o);
bool LockSelectionToBackupItem(Object o, bool silent);
bool LockSelectionToNothing(Object o, bool silent);
void UnlockSelection(Object o);
bool IsSlotSelectable (int index);
bool SelectBackupItem(bool toggle, bool silent);
bool isBackupItemSelected { get; }
void AutoSwitchSlot (int slot);
void SwitchSelection ();
void DropSelected ();
}
}