Esempio n. 1
0
 public void Deserialize(BinaryReader reader)
 {
     Type = (VMCommandType)reader.ReadByte();
     Type cmdType = CmdMap[Type];
     Command = (VMNetCommandBodyAbstract)Activator.CreateInstance(cmdType);
     Command.Deserialize(reader);
 }
        public void Deserialize(BinaryReader reader)
        {
            Type = (VMCommandType)reader.ReadByte();
            Type cmdType = CmdMap[Type];

            Command = (VMNetCommandBodyAbstract)Activator.CreateInstance(cmdType);
            Command.Deserialize(reader);
        }
Esempio n. 3
0
        public bool TryDeserialize(BinaryReader reader, bool isClient)
        {
            Type = (VMCommandType)reader.ReadByte();
            Type cmdType = CmdMap[Type];

            Command = (VMNetCommandBodyAbstract)Activator.CreateInstance(cmdType);
            if (Command.AcceptFromClient || isClient)
            {
                Command.Deserialize(reader);
                return(true);
            }
            return(false);
        }
Esempio n. 4
0
 public void SetCommand(VMNetCommandBodyAbstract cmd)
 {
     Type    = ReverseMap[cmd.GetType()];
     Command = cmd;
 }
Esempio n. 5
0
 public void SetCommand(VMNetCommandBodyAbstract cmd)
 {
     Type = ReverseMap[cmd.GetType()];
     Command = cmd;
 }