Пример #1
0
        public Picker(Package package, WeaponBelt weaponBelt)
        {
            _Package    = package;
            _WeaponBelt = weaponBelt;

            PublicEvents.PickupItem.AddListener(Pickup);
        }
Пример #2
0
        public void Pickup(ItemGroup group)
        {
            if (WeaponBelt.IsWeapon(group.Id))
            {
                _WeaponBelt.PutItem((group.Id, 1));
                return;
            }

            if (!_Package.CanPackage(group.Id))
            {
                return;
            }
            _Package.PutItem(group);
        }