示例#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);
     }
 }
示例#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;
 }
示例#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());
     }
 }
示例#5
0
文件: MainForm.cs 项目: planee/cber
        /// <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);
        }
示例#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;
     }
示例#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];
    }
示例#8
0
 // Use this for initialization
 void Start()
 {
     typeNow   = pType.nullPro;
     sr.sprite = sprites[(int)typeNow];
 }
示例#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);
 }
示例#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 });
 }
示例#13
0
 public AStar (pType ptype)
 {
     type = ptype;
 }
示例#14
0
 public pane(pType _type)
 {
     type = _type;
     img = null;
 }