public static void Peng(int num) { Debug.Log("碰了:" + num); Table.Peng peng = new Table.Peng(); peng.card = num; NetClient.Instance().WriteMsg("Table.Peng", peng); }
public void peng(Table.Peng peng) { if (peng.err_no == 0) { if (peng.id == MainRole.Instance.Id) { CardController.Instance.cleanUp(); for (int i = 0; i < peng.leftcard.Count; i++) { CardController.Instance.addCard(peng.leftcard[i]); } DataMgr.Instance._curCard = peng.nextcard; } EventDispatcher.Instance.Dispatch(GameEventConst.PENG, peng.id.idToPos(), peng.from.idToPos(), peng.card); SoundMgr._instance.soundPlay("peng_" + (RoleController.Instance.getPlayerById(peng.id).Sex ? "0" : "1") + "_" + GameConst.Language, GameConst.soundVol); } }