1
This commit is contained in:
@@ -46,6 +46,7 @@ namespace BITFALL.Entities.Equipment.Universal
|
||||
[Inject] private IPlayerInventory _playerInventory;
|
||||
[Inject] private IEntityInventory _inventory;
|
||||
[Inject] private IPlayerEquipSelector _playerEquipSelector;
|
||||
[Inject] private IEntityEquipmentContainer _equipmentContainer;
|
||||
public bool IClosed { get; set; }
|
||||
public override void OnAwake()
|
||||
{
|
||||
@@ -118,13 +119,17 @@ namespace BITFALL.Entities.Equipment.Universal
|
||||
public override void AnimationEvent(string eventName)
|
||||
{
|
||||
base.AnimationEvent(eventName);
|
||||
|
||||
|
||||
switch (eventName)
|
||||
{
|
||||
case BITConstant.Player.Use when CurrentState is Use:
|
||||
if (_inventory.UseItem(Item))
|
||||
if (item.TryGetProperty<EquipmentAsSlot>(out var asSlot))
|
||||
{
|
||||
|
||||
_equipmentContainer.TryUseEquip(asSlot.slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
_inventory.UseItem(Item);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user