Example #1
0
        public void DropItem(GameObject gameObject, TechType techType, Vector3 dropPosition)
        {
            String guid = GuidHelper.GetGuid(gameObject);

            SyncedMultiplayerObject.ApplyTo(gameObject);

            Console.WriteLine("Dropping item with guid: " + guid);

            DroppedItem droppedItem = new DroppedItem(PlayerId, guid, ApiHelper.TechType(techType), ApiHelper.Vector3(dropPosition));

            Send(droppedItem);
        }
Example #2
0
        public void Dropped(GameObject gameObject, TechType techType, Vector3 dropPosition)
        {
            Optional <String> waterpark = GetCurrentWaterParkGuid();
            String            guid      = GuidHelper.GetGuid(gameObject);

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

            SyncedMultiplayerObject.ApplyTo(gameObject);

            Log.Debug("Dropping item with guid: " + guid);

            DroppedItem droppedItem = new DroppedItem(packetSender.PlayerId, guid, waterpark, techType, dropPosition, bytes);

            packetSender.Send(droppedItem);
        }