private void stepAction() { GameBehaviourVO temp = aa.behavieList[stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 31) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setQiang(temp.gangType); qiangs.Add(temp.gangType); } else if (temp.type == 32) { for (int i = 0; i < aa.playerItems.Count; i++) { playerItems[realIndex[i]].GetComponent <PlayerItemBackScript>().setQiang(-1); } tempcurIndex = getCurIndex(temp.gangType); playerItems[tempcurIndex].bankerImg.enabled = true; } else if (temp.type == 33) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setZhu(temp.gangType); zhus.Add(temp.gangType); } else if (temp.type == 34) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setNiu(temp.gangType); nius.Add(temp.gangType); } //SetDirGameObjectAction (tempcurIndex); stepNum++; }
//type 操作相关步骤 1出牌,2摸牌,3吃,4碰,5杠,6胡(自摸/点炮),7抢胡,8抓码,9:流局..... private void stepAction() { GameBehaviourVO gvo = replayVO.behavieList [curBehaviorIndex]; usedList.Insert(0, gvo); Debug.Log(">" + curBehaviorIndex + " : " + JsonMapper.ToJson(gvo)); int avatarIndex = gvo.accountindex_id; int cardPoint = int.Parse(gvo.cardIndex); if (gvo.type == 1) { _uiHelper.putoutCard(avatarIndex, cardPoint); } else if (gvo.type == 2) { _data.remainCardNum--; _uiHelper.pickCard(avatarIndex, cardPoint); } else if (gvo.type == 3) { _uiHelper.chiCard(avatarIndex, cardPoint, gvo.gangType); } else if (gvo.type == 4) { _uiHelper.pengCard(avatarIndex, cardPoint); } else if (gvo.type == 5) { _uiHelper.gangCard(avatarIndex, cardPoint, gvo.gangType); } else if (gvo.type == 6) { _uiHelper.huCard(avatarIndex, cardPoint); } else if (gvo.type == 7) { _uiHelper.qiangGangHu(avatarIndex, cardPoint); } else if (gvo.type == 8) { if (replayVO.roomvo.roomType == GameType.HUA_SHUI) //划水麻将不显示码框 { } else { zhuama(gvo.ma, gvo.valideMa); } } else if (gvo.type == 9) { liuju(); } _data.pickIndex = avatarIndex; curBehaviorIndex++; }
private void frontAction() { if (usedList.Count > 0) { //play = false; GameBehaviourVO temp = usedList [0]; usedList.RemoveAt(0); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 1) { frontIncard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 2) { stepNum--; frontOutcard(tempcurIndex, int.Parse(temp.cardIndex)); cardCount++; showCardNumber(); frontAction(); return; } else if (temp.type == 3) { frontChiCard(tempcurIndex, temp.getOutCard()); } else if (temp.type == 4) { frontPengCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 5) { frontGangCard(tempcurIndex, int.Parse(temp.cardIndex), temp.gangType); } else if (temp.type == 6) { frontHuCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 7) { frontOutcard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 8) { //frontZhuaMa (); } else if (temp.type == 9) { frontLiuju(); } SetDirGameObjectAction(tempcurIndex); stepNum--; processText.text = "播放进度:" + (int)(stepNum * 100 / aa.behavieList.Count) + "%"; //play = true; } }
private void stepAction() { GameBehaviourVO temp = aa.behavieList[stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 1) { outCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 2) { pickCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 3) { chiCard(tempcurIndex, temp.getOutCard()); } else if (temp.type == 4) { pengCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 5) { gangCard(tempcurIndex, int.Parse(temp.cardIndex), temp.gangType); } else if (temp.type == 6) { huCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 7) { qiangGangHu(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 8) { if (roomType == (int)GameType.GameType_MJ_HuaShui) //划水麻将不显示码框 { } else { zhuama(temp.ma, temp.valideMa); } } else if (temp.type == 9) { liuju(); } SetDirGameObjectAction(tempcurIndex); stepNum++; }
private void stepAction() { GameBehaviourVO temp = aa.behavieList [stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 1) { outCard(tempcurIndex, temp.getOutPai()); } //SetDirGameObjectAction (tempcurIndex); stepNum++; }
private void frontAction() { if (usedList.Count > 0) { //play = false; GameBehaviourVO temp = usedList [0]; usedList.RemoveAt(0); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 0) //0:让,1:跟,2:加,3:弃牌 { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().frontRangPai(); } else if (temp.type == 1) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().frontGenZhu(temp.gangType); } else if (temp.type == 2) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().frontJiaZhu(temp.gangType); } else if (temp.type == 3) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().frontQiPai(); } else if (temp.type == -1) //发牌 { List <GameObject> cards = handerCardList[handerCardList.Count - 1]; int count = cards.Count; for (int i = 0; i < count; i++) { GameObject gob = cards [0]; cards.RemoveAt(0); Destroy(gob); } handerCardList.RemoveAt(handerCardList.Count - 1); } else if (temp.type == -2) //胜利 { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().frontSuccess(); } stepNum--; processText.text = "播放进度:" + (int)(stepNum * 100 / aa.behavieList.Count) + "%"; //play = true; } }
private void stepAction() { GameBehaviourVO temp = gamePlayResponseVo.behavieList[stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 1) { outCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 2) { pickCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 4) { pengCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 5) { gangCard(tempcurIndex, int.Parse(temp.cardIndex), temp.gangType); } else if (temp.type == 6) { huCard(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 7) { qiangGangHu(tempcurIndex, int.Parse(temp.cardIndex)); } else if (temp.type == 8) { if (roomType == GameConfig.GAME_TYPE_HUASHUI) //划水麻将不显示码框 { } else { zhuama(temp.ma, temp.valideMa); } } else if (temp.type == 9) { liuju(); } SetDirGameObjectAction(tempcurIndex); stepNum++; }
private void stepAction() { GameBehaviourVO temp = aa.behavieList [stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 0) //0:让,1:跟,2:加,3:弃牌 { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKRangPai(); } else if (temp.type == 1) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKGenZhu(temp.gangType); } else if (temp.type == 2) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKJiaZhu(temp.gangType); } else if (temp.type == 3) { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKQiPai(); } else if (temp.type == -1) //发牌 { int[] deskCard = temp.getOutPai(); List <GameObject> cards = new List <GameObject> (); for (int i = 0; i < deskCard.Length; i++) { GameObject gob = Instantiate(Resources.Load("prefab/pdk/HandCard_s")) as GameObject; if (gob != null) { gob.transform.SetParent(parentList [6]); gob.transform.localScale = new Vector3(1, 1, 1); gob.GetComponent <pdkCardScript> ().setPoint(deskCard [i], 4); cards.Add(gob); } } handerCardList.Add(cards); } else if (temp.type == -2) //胜利 { playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKSuccess(); } stepNum++; }
private void frontAction() { if (usedList.Count > 0) { //play = false; GameBehaviourVO temp = usedList [0]; usedList.RemoveAt(0); int tempcurIndex = getCurIndex(temp.accountindex_id); if (temp.type == 1) { frontIncard(tempcurIndex, temp.getOutPai()); } //SetDirGameObjectAction (tempcurIndex); stepNum--; processText.text = "播放进度:" + (int)(stepNum * 100 / aa.behavieList.Count) + "%"; //play = true; } }
private void frontAction() { if (usedList.Count > 0) { //play = false; GameBehaviourVO temp = usedList[0]; usedList.RemoveAt(0); int tempcurIndex = getCurIndex(temp.accountindex_id); /** * if (temp.type == 1) { * frontIncard (tempcurIndex, temp.getOutPai()); * } */ //SetDirGameObjectAction (tempcurIndex); if (temp.type == 31) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setQiang(-1); } else if (temp.type == 32) { for (int i = 0; i < aa.playerItems.Count; i++) { playerItems[realIndex[i]].GetComponent <PlayerItemBackScript>().setQiang(qiangs[i]); } tempcurIndex = getCurIndex(temp.gangType); playerItems[tempcurIndex].bankerImg.enabled = false; } else if (temp.type == 33) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setZhu(0); } else if (temp.type == 34) { playerItems[tempcurIndex].GetComponent <PlayerItemBackScript>().setNiu(-1); } stepNum--; processText.text = "播放进度:" + (int)(stepNum * 100 / aa.behavieList.Count) + "%"; //play = true; } }
private void stepAction() { GameBehaviourVO temp = aa.behavieList [stepNum]; usedList.Insert(0, temp); int tempcurIndex = getCurIndex(temp.accountindex_id); switch (temp.type) { case 1: { outCard(tempcurIndex, int.Parse(temp.cardIndex)); } break; case 2: { pickCard(tempcurIndex, int.Parse(temp.cardIndex)); } break; case 4: { pengCard(tempcurIndex, int.Parse(temp.cardIndex)); } break; case 5: { gangCard(tempcurIndex, int.Parse(temp.cardIndex), temp.gangType); } break; case 6: { huCard(tempcurIndex, int.Parse(temp.cardIndex)); } break; case 7: { qiangGangHu(tempcurIndex, int.Parse(temp.cardIndex)); } break; case 8: { } break; case 9: { liuju(); } break; case 11: case 12: case 13: case 14: buhua(tempcurIndex, int.Parse(temp.cardIndex)); SetDirGameObjectAction(tempcurIndex); stepNum++; stepAction(); if (stepNum < aa.behavieList.Count) { temp = aa.behavieList [stepNum]; if (temp.type >= 11 && temp.type <= 14) { stepAction(); } } return; case 15: buhuaBegin(tempcurIndex, int.Parse(temp.cardIndex)); stepNum++; stepAction(); return; case 16: buhuaBeginPickCard(tempcurIndex, int.Parse(temp.cardIndex)); stepNum++; stepAction(); return; } SetDirGameObjectAction(tempcurIndex); stepNum++; }