Exemplo n.º 1
0
 public static void Reset()
 {
     playerGamingSyn  = null;
     gameOperStartSyn = null;
     actionNotify     = null;
     huSyn            = null;
     finalSettleSyn   = null;
 }
Exemplo n.º 2
0
    void OnGameOperStartSyn(GameOperStartSyn data)
    {
        Debug.LogFormat("===StartSyn(seq[" + data.seq + "]):" + Utils.ToStr(data));

        Game.Instance.state = GameState.Playing;

        Game.SoundManager.PlayRoundStartSound();
        RoomMgr.gameOperStartSyn = data;
        Game.MJMgr.Clear();

        Game.MJMgr.CardLeft = data.cardLeft;

        print("    ============ data.guiCard ==============   " + data.guiCards.Count + " / " + data.guiCards[0]);

        Game.MJMgr.tmpHui = data.guiCards[0];
        //Game.MJMgr.Init();
        Game.Instance.Ting = false;
        //Game.IsBusy = false;

        //Game.MJMgr.HangUp = false;

        for (int i = 0; i < Game.MJMgr.MjData.Length; i++)
        {
            if (null != Game.MJMgr.MjData[i])
            {
                Player player = Game.MJMgr.MjData[i].player;
                if (null != player)
                {
                    player.ting = false;
                }
            }
        }

        Game.MJMgr.MakersPosition = data.bankerPos;    // 庄家位置
        MJPlayer banker = Game.MJMgr.GetPlayerByPosition(data.bankerPos);

        Game.MJMgr.Shuffle();

        if (data.reconnect)
        {
            Game.MJTable.Dice(data.dice1, data.dice2);
            LicensingOnReconnect(data.playerHandCards);
        }
        else
        {
            banker.MJHand.PlayDize(data.dice1, data.dice2);

            LicensingOnStart(data.playerHandCards);
            Game.MJTable.PlayShuffle();

            Game.Delay(1, () =>
            {
                Game.MJMgr.Licensing(data.playerHandCards);
            });
        }

        if (Game.UIMgr.IsSceneActive(UIPage.PlayPage))
        {
            EventDispatcher.DispatchEvent(MessageCommand.MJ_UpdatePlayPage);
        }
        else
        {
            Game.UIMgr.PushScene(UIPage.PlayPage);
        }
    }