Пример #1
0
        public void AddItem(Pickupable pickupable, GameObject owner)
        {
            String  ownerGuid = GuidHelper.GetGuid(owner);
            Vector3 ownerPos  = owner.transform.position;

            byte[] bytes = SerializationHelper.GetBytes(pickupable.gameObject);

            ItemContainerAdd add = new ItemContainerAdd(packetSender.PlayerId, ownerGuid, bytes, ApiHelper.Vector3(ownerPos));

            packetSender.Send(add);

            Console.WriteLine(add);
            Console.WriteLine(DebugUtils.ByteArrayToHexString(bytes));
        }