Пример #1
0
        public BuildOutPut GetBuildOutPut(byte typed)
        {
            BuildOutPut result = null;

            mOutDict.TryGetValue(typed, out result);
            return(result);
        }
Пример #2
0
 public void AddOutPut(BuildOutPut output, bool addtime = true)
 {
     mOutDict[output.mType] = output;
     if (addtime)
     {
         output.mTimerHandler = TimerManager.doLoop(output.GetPer(), TimeOver, output);
     }
 }
Пример #3
0
        public void CreateOutPutToAdd(byte type)
        {
            if (GetBuildOutPut(type) != null)
            {
                return;
            }
            BuildOutPut output = new BuildOutPut((byte)type);

            output.mStartTime = System.DateTime.Now;
            AddOutPut(output);
        }
Пример #4
0
        //--------------------------------------数据存取---------------------------------------------------------

        //初始化数据库数据
        public void MartialUnSerialize(PlayerInstance role, byte[] buffer)
        {
            mRole = role;
            if (buffer == null || buffer.Length <= 0)
            {
                return;
            }
            RPC.DataReader dr    = new RPC.DataReader(buffer, 0, buffer.Length, buffer.Length);
            byte           count = dr.ReadByte();

            for (byte i = 0; i < count; i++)
            {
                byte        type   = dr.ReadByte();
                BuildOutPut output = new BuildOutPut(type);
                output.mStartTime      = dr.ReadDateTime();
                output.mOutCount       = dr.ReadByte();
                output.mUpOutIndex     = dr.ReadSByte();
                output.mUpStartTime    = dr.ReadDateTime();
                output.mOutPutTotalNum = dr.ReadInt32();
                AddOutPut(output, false);
            }
            InitOutData();
        }