示例#1
0
文件: Player.cs 项目: t61789/Thunder
        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);
        }
示例#2
0
文件: Player.cs 项目: t61789/Thunder
        public void ReceiveItem(ItemGroup group)
        {
            int remaining = WeaponBelt.PutItem(group).Remaining.FirstOrDefault().Count;

            if (remaining == 0)
            {
                return;
            }
            group.Count = remaining;

            remaining = Package.PutItem(group).Remaining.FirstOrDefault().Count;
            if (remaining == 0)
            {
                return;
            }
            group.Count = remaining;

            Drop(group);
        }