예제 #1
0
        public void AfterDeserialize()
        {
            var reader   = new Deserializer(inputDatas);
            var inputLen = reader.ReadByte();

            _inputs = new Msg_PlayerInput[inputLen];
            for (byte i = 0; i < inputLen; i++)
            {
                var input = new Msg_PlayerInput();
                input.Tick    = tick;
                input.ActorId = i;
                _inputs[i]    = input;
                var len = reader.ReadByte();
                if (len == 0)
                {
                    input.Commands = null;
                    continue;
                }

                input.Commands = new InputCmd[len];
                for (int cmdIdx = 0; cmdIdx < len; cmdIdx++)
                {
                    var cmd = new InputCmd();
                    cmd.Deserialize(reader);
                    input.Commands[cmdIdx] = cmd;
                }
            }

            _serverInputs = reader.ReadBytes_255();
        }
예제 #2
0
 public bool Equals(InputCmd cmdb)
 {
     if (cmdb == null)
     {
         return(false);
     }
     return(content.EqualsEx(cmdb.content));
 }