Exemple #1
0
 public void gang(Table.Gang gang)
 {
     if (gang.err_no == 0)
     {
         if (gang.id == MainRole.Instance.Id)
         {
             CardController.Instance.cleanUp();
             for (int i = 0; i < gang.leftcard.Count; i++)
             {
                 CardController.Instance.addCard(gang.leftcard[i]);
             }
         }
         DataMgr.Instance._curCard = gang.card;
         if (gang.from == 0)
         {
             SoundMgr._instance.soundPlay("bugang_" + (RoleController.Instance.getPlayerById(gang.id).Sex ? "0" : "1") + "_" + GameConst.Language, GameConst.soundVol);
             EventDispatcher.Instance.Dispatch(GameEventConst.GANG, gang.id.idToPos(), gang.id.idToPos(), gang.card, true);
         }
         else
         {
             EventDispatcher.Instance.Dispatch(GameEventConst.GANG, gang.id.idToPos(), gang.from.idToPos(), gang.card, false);
             if (gang.id == gang.from)
             {
                 SoundMgr._instance.soundPlay("angang_" + (RoleController.Instance.getPlayerById(gang.id).Sex ? "0" : "1") + "_" + GameConst.Language, GameConst.soundVol);
             }
             else
             {
                 SoundMgr._instance.soundPlay("minggang_" + (RoleController.Instance.getPlayerById(gang.id).Sex ? "0" : "1") + "_" + GameConst.Language, GameConst.soundVol);
             }
         }
     }
 }
Exemple #2
0
 public static void Gang(int num)
 {
     Debug.Log("杠了个:" + num);
     Table.Gang gang = new Table.Gang();
     gang.card = num;
     NetClient.Instance().WriteMsg("Table.Gang", gang);
 }