/// <summary /> private void SelectUsable(IUseableDescriptor actable) { if (_selectedUsable?.Shared == actable) { return; } _selectedUsable?.Detach(this); var location = _playerBodyBehavior.WeaponOffset.ToLocation(_playerBody); var usable = actable.CreateAndAttachUsable(this, _playerBody.gameObject.transform, location); _selectedUsable = usable; _hud.EquipmentName = actable?.Name ?? "<>"; Reload(); _reloadLimiter.RechargeRate = actable.TimeToRecharge; }
public SelectedItemData(IUseableDescriptor item, IUsable instanceData) { Item = item; InstanceData = instanceData; }