示例#1
0
        public ObjectSyncMessage(P2PMessage msg)
        {
            int objCount = msg.ReadByte();

            for (int i = 0; i < objCount; i++)
            {
                objectsToSync.Add(msg.ReadByte(), Tuple.Create(msg.ReadVector3(), msg.ReadCompressedQuaternion()));
            }
        }
示例#2
0
        public PlayerPositionMessage(P2PMessage msg)
        {
            playerId = msg.ReadByte();

            headPos  = msg.ReadVector3();
            lHandPos = msg.ReadVector3();
            rHandPos = msg.ReadVector3();

            headRot  = msg.ReadCompressedQuaternion();
            lHandRot = msg.ReadCompressedQuaternion();
            rHandRot = msg.ReadCompressedQuaternion();
        }
示例#3
0
 public ClientJoinMessage(P2PMessage msg)
 {
     playerId      = msg.ReadByte();
     steamId.Value = msg.ReadUlong();
     name          = msg.ReadUnicodeString();
 }
示例#4
0
 public IDAllocationMessage(P2PMessage msg)
 {
     namePath    = msg.ReadUnicodeString();
     allocatedId = msg.ReadByte();
 }
示例#5
0
 public OtherPlayerNameMessage(P2PMessage msg)
 {
     playerId = msg.ReadByte();
     name     = msg.ReadUnicodeString();
 }