//变更道具方法 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); } }
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; }
void InitParkour(pType initPType) { if (initPType == pType.Vault) { StartCoroutine(Vault()); } else if (initPType == pType.ClimbUp) { StartCoroutine(ClimbUp()); } else if (initPType == pType.JumpOver) { StartCoroutine(JumpOver()); } }
/// <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); }
//********************************************************************************** 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; }
//令道具生效的总方法 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]; }
// Use this for initialization void Start() { typeNow = pType.nullPro; sr.sprite = sprites[(int)typeNow]; }
/// <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); }
/// <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 }); }
public AStar (pType ptype) { type = ptype; }
public pane(pType _type) { type = _type; img = null; }