Exemplo n.º 1
0
 //变更道具方法
 private void ChangeProperty()
 {
     //更改类型
     typeNow = (pType)rand.Next(0, (int)pType.number - 1);
     //更改图片
     sr.sprite = sprites[(int)typeNow];
 }
 public Packet(pType packetType, sendType typeOfSend, object obj = null)
 {
     this.packetType     = packetType;
     this.packetSendType = typeOfSend;
     if (obj != null)
     {
         SetPacketData(obj);
     }
 }
Exemplo n.º 3
0
 public pane(int _id,int _pos, pType _type,String _text, String _img,char _answer)
 {
     id = _id;
     pos = _pos;
     type = _type;
     text = _text;
     img = _img;
     answer = _answer;
 }
Exemplo n.º 4
0
 void InitParkour(pType initPType)
 {
     if (initPType == pType.Vault)
     {
         StartCoroutine(Vault());
     }
     else if (initPType == pType.ClimbUp)
     {
         StartCoroutine(ClimbUp());
     }
     else if (initPType == pType.JumpOver)
     {
         StartCoroutine(JumpOver());
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// 解析接收的报文
        /// </summary>
        /// <param name="buf">报文数据</param>
        /// <returns>是否向升级主站转发数据</returns>
        private bool ParsePacket(byte[] buf)
        {
            bool  IsRetrunPacket = false;
            pType bufftype       = cc.ParseData(buf);

            if (bufftype == pType.COMFIRM)
            {
                if (Login == ConnStatus.Logining)
                {
                    Login = ConnStatus.logined;
                }
                else if (HeatBeat == ConnStatus.HeartBeating)
                {
                    HeatBeat = ConnStatus.HeartBeated;
                }
            }
            else if (bufftype == pType.TRANSFER)
            {
                IsRetrunPacket = true;
            }
            return(IsRetrunPacket);
        }
Exemplo n.º 6
0
 //**********************************************************************************
     public bool addSourceFile(string filename)
     {
         pType    file_type;
         FileInfo fi = new FileInfo(filename);
     //******************************************************************************
     // Determine file type
     //******************************************************************************
         switch (fi.Extension.ToUpper())
         {
             case ".CS":
                 file_type = pType.CS;
                 break;
             case ".VB":
                 file_type = pType.VB;
                 break;
             default:
                 type   = pType.Error;
                 status = "Invalid file type: " + fi.Extension;
                 return false;
         }
     //******************************************************************************
     // Match this file type with existing - we don't support mixed projects
     //******************************************************************************
         if (type == pType.Unknown) type = file_type;
         else
         {
             if (type != file_type) 
             {
                 status = "Mixed source file types - not supported";
                 return false;
             }
         }
     //******************************************************************************
     // Everything's okay - add the file and return
     //******************************************************************************
         files.Add(filename);
         return true;
     }
Exemplo n.º 7
0
    //令道具生效的总方法
    private void ActiveProperty(Collider2D other)
    {
        switch (typeNow)
        {
        case pType.bounce:
            ActiveBounce(other);
            break;

        case pType.fission:
            ActiveFission(other);
            break;

        case pType.save:
            ActiveSave(other);
            break;

        case pType.thunder:
            ActiveThunder(other);
            break;
        }
        typeNow   = pType.nullPro;
        sr.sprite = sprites[(int)typeNow];
    }
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     typeNow   = pType.nullPro;
     sr.sprite = sprites[(int)typeNow];
 }
Exemplo n.º 9
0
 /// <summary>
 /// 配合比通知单信息绑定
 /// </summary>
 /// <param name="dgv">对应DataGridView</param>
 /// <param name="sqlWhere">筛选条件</param>
 /// <param name="Type">类型枚举</param>
 public void ProduceProportionBind(DataGridView dgv, string sqlWhere, pType type)
 {
     producePlanDB.ProduceProportionBind(dgv, sqlWhere, type);
 }
Exemplo n.º 10
0
 /// <summary>
 /// 删除生产记录
 /// </summary>
 /// <param name="spId">生产记录ID</param>
 /// <returns>True:成功 False:失败</returns>
 public bool delProduceLog(string plId, pType type)
 {
     return(producePlanDB.delProduceLog(plId, type));
 }
 public Packet(pType packetType, sendType typeOfSend, byte[] obj)
 {
     this.packetType     = packetType;
     this.packetSendType = typeOfSend;
     packetData          = obj;
 }
 public Packet(pType packetType, sendType typeOfSend, byte b)
 {
     this.packetType     = packetType;
     this.packetSendType = typeOfSend;
     SetPacketData(new byte[] { b });
 }
Exemplo n.º 13
0
 public AStar (pType ptype)
 {
     type = ptype;
 }
Exemplo n.º 14
0
 public pane(pType _type)
 {
     type = _type;
     img = null;
 }