public bool CanAttack(GameObject inTarget) { if (inTarget != null) { var currentHoldable = _heldItem.GetHeldItem(); if (currentHoldable != null) { var weaponInterface = currentHoldable.GetHoldableObject().GetComponent <IWeaponInterface>(); if (weaponInterface != null) { return(weaponInterface.CanUseWeapon(inTarget)); } } } return(false); }
private bool NotHoldingAnything(IHeldItemInterface inHeldItemInterface) { return(inHeldItemInterface == null || inHeldItemInterface.GetHeldItem() == null); }