Пример #1
0
        /// <summary>
        /// 解析帧信息
        /// </summary>
        /// <param name="message">消息</param>
        public void ReceiveStep(ProtocolBase message)
        {
            frameKey.Parse(message);
            //Debug.Log(keyList[InputCenter.Instance.ServerStepIndex]);
            byte len = message.getByte();


            for (byte i = 0; i < len; i++)
            {
                JoyStickKey joy = new JoyStickKey((KeyNum)(message.getByte()), message.getV2());
                //             Debug.LogError("rec+["+joy.key+"]");
                if (joySticks.ContainsKey(joy.key))
                {
                    joySticks[joy.key] = joy;
                }
                else
                {
                    joySticks.Add(joy.key, joy);
                }
            }
        }