Пример #1
0
        /// <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;
        }
Пример #2
0
 public SelectedItemData(IUseableDescriptor item, IUsable instanceData)
 {
     Item         = item;
     InstanceData = instanceData;
 }