Esempio n. 1
0
 public void UpdateChange(int clientId, int entityId, int trackableDataIndex, ITracker tracker)
 {
     _writer.Write((byte)12);
     _writer.Write(entityId);
     _writer.Write((byte)trackableDataIndex);
     ProtobufStreamHelper.WriteObject(_writer, tracker, TypeTable, TypeModel);
 }
Esempio n. 2
0
        public void Spawn(int entityId, Type protoType, int ownerId, EntityFlags flags, ISpawnPayload payload)
        {
            _writer.Write((byte)2);
            _writer.Write(entityId);
            var typeAlias = TypeTable.GetAlias(protoType);

            if (typeAlias == 0)
            {
                throw new ArgumentException("Type of protoType doesn't have alias. Type: " + protoType.FullName);
            }
            _writer.Write(typeAlias);
            _writer.Write(ownerId);
            _writer.Write((byte)flags);
            ProtobufStreamHelper.WriteObject(_writer, payload, TypeTable, TypeModel);
        }
Esempio n. 3
0
 public void UpdateChange(int entityId, IUpdateChangePayload payload)
 {
     _writer.Write((byte)5);
     _writer.Write(entityId);
     ProtobufStreamHelper.WriteObject(_writer, payload, TypeTable, TypeModel);
 }
Esempio n. 4
0
 public void Invoke(int entityId, IInvokePayload payload)
 {
     _writer.Write((byte)4);
     _writer.Write(entityId);
     ProtobufStreamHelper.WriteObject(_writer, payload, TypeTable, TypeModel);
 }