예제 #1
0
 protected GameScene(IntPtr handle) : base(handle)
 {
     fetch    = new setup1();
     data     = new fetch_data();
     move     = new movements();
     player1  = new Sprite.Entity(fetch.p1());
     sprites  = new Sprite[10, 10, 3];
     Nextmove = false;
     //accelx = 0;
     //accely = 0;
     Height             = Frame.Size.Height;
     Width              = Frame.Size.Width;
     bg                 = SKSpriteNode.FromImageNamed("background/background");
     player1.spriteNode = SKSpriteNode.FromImageNamed(player1.spritef);
     //p1 = SKSpriteNode.FromImageNamed("sprites/player/p1front");
 }
예제 #2
0
파일: NAS_deC.cs 프로젝트: liuli1689/DCS
        public byte algorithm   = 0;                                             //用于多段关联
        public void nas_decode1(byte[] s1ap, List <byte[]> kasme, int direction) //输入为s1ap数据流
        {
            byte type      = 0;
            byte procedure = 0;
            int  key       = 0;

            byte[] nas_pdu = new byte[1];
            identity  = "";  //UE的标识IMSI或TMSI
            cause_str = "";  //nas cause
            nas_name  = " "; //nas 名称;
            ue_ip     = "";
            nasPdu1       nas1        = new nasPdu1();
            setup1        setup2      = new setup1();
            ErabModifyReq modify2     = new ErabModifyReq();
            initial_ue    initial_ue1 = new initial_ue();
            nasDecrypt0   nasDecrypt2 = new nasDecrypt0();

            type      = s1ap[0];
            procedure = s1ap[1];
            key       = (int)(procedure + type * 256);
            //从s1ap中获取nas-pdu
            if ((key == 7) || (key == 11) || (key == 12) || (key == 13) || (key == 16))//nas-pdu为1阶信元
            {
                nas_pdu = nas1.nasShuzu(s1ap);
                //direction = nas1.direction;       //方向由输入的参数给出  (黄刚)2017.6.7
            }
            else if (key == 5)//E-rab setup request
            {
                nas_pdu = setup2.setup_list(s1ap);
                //direction = setup2.direction;
            }
            else if (key == 6)
            {
                nas_pdu = modify2.nasIE(s1ap);
                //direction = modify2.direction;
            }
            else if (key == 9)
            {
                nas_pdu = initial_ue1.initialUe(s1ap);
                //direction = initial_ue1.direction;
            }
            else//不含有nas-pdu
            {
                ;
            }
            //解析解码nas-pdu
            if (nas_pdu.Length > 1)//只有当有nas消息时才进行解析,因为定义nas_pdu时分配了1个空间
            {
                nasDecrypt2.decrypt(nas_pdu, direction, kasme);
                identity  = nasDecrypt2.identity;
                cause_str = nasDecrypt2.cause_str;
                nas_name  = nasDecrypt2.str2 + " " + nasDecrypt2.str1;
                ue_ip     = nasDecrypt2.ue_ip;
            }
            else //该s1ap消息不包含nas消息
            {
                identity  = "";//UE的标识IMSI或TMSI
                cause_str = "";  //nas cause
                nas_name  = " "; //nas 名称;
                ue_ip     = "";
            }
        }