예제 #1
0
        /// <summary>
        /// This method decodes a message from a byte list
        /// </summary>
        /// <param name="bytes"></param>
        virtual public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            MessageNr      = bytes.GetDistributableObject() as MessageNumber;
            ConversationId = bytes.GetDistributableObject() as MessageNumber;

            bytes.RestorePreviosReadLimit();
        }
예제 #2
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ComponentId  = bytes.GetInt16();
            ToSquare     = bytes.GetDistributableObject() as FieldLocation;
            EnablingTick = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
예제 #3
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ThrowingBrilliantStudentId = bytes.GetInt16();
            Bomb          = bytes.GetDistributableObject() as Bomb;
            TowardsSquare = bytes.GetDistributableObject() as FieldLocation;
            EnablingTick  = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            Resource = bytes.GetDistributableObject();

            bytes.RestorePreviosReadLimit();
        }
예제 #5
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ComponentId    = bytes.GetInt16();
            TickToValidate = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
예제 #6
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            GameId  = bytes.GetInt16();
            Winners = bytes.GetDistributableObject() as AgentList;

            bytes.RestorePreviosReadLimit();
        }
예제 #7
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ZombieId     = bytes.GetInt16();
            TargetId     = bytes.GetInt16();
            EnablingTick = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
예제 #8
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            GameId          = bytes.GetInt16();
            GetResourceType = (PossibleResourceType)bytes.GetByte();
            EnablingTick    = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
예제 #9
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            IntResult = bytes.GetInt32();
            ObjResult = bytes.GetDistributableObject();
            Message   = bytes.GetString();

            bytes.RestorePreviosReadLimit();
        }
예제 #10
0
        override public void Decode(ByteList bytes)
        {
            log.Debug("Decoding JoinGame");
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            log.DebugFormat("objType={0}, objLength={1}", objType, objLength);

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            GameId = bytes.GetInt16();
            log.DebugFormat("GameId={0}", GameId);
            AgentInfo = bytes.GetDistributableObject() as AgentInfo;
            log.DebugFormat("AgentInfo.AgentType={0}, ANumber={1}, FirstName={2}, LastName={3}", AgentInfo.AgentType, AgentInfo.ANumber, AgentInfo.FirstName, AgentInfo.LastName);

            bytes.RestorePreviosReadLimit();
            log.DebugFormat("Decoding of JoinGame Complete");
        }