Beispiel #1
0
        public virtual MahjongItem ThrowOutByValue(int value)
        {
            MahjongItem Mahjong = null;

            for (int i = MahjongList.Count - 1; i >= 0; i--)
            {
                if (MahjongList[i].Value == value)
                {
                    Mahjong = MahjongList[i];
                }
            }
            if (Mahjong == null)
            {
                Mahjong = GetMahjongItemByValue(value);
            }
            Mahjong.ShowNormal();
            MahjongManager.Instance.ExchangeByValue(value, Mahjong);
            MahjongList.Remove(Mahjong);
            SortMahjongForHand();
            if (GameConfig.GetInEffect)
            {
                PickUpMahjongAction(Mahjong);
            }
            else
            {
                SetMahjongPos();
            }
            MahjongManager.Instance.Recycle(Mahjong);
            LastGetIn = null;
            return(Mahjong);
        }
Beispiel #2
0
        public virtual MahjongItem ThrowOut(int value)
        {
            MahjongItem Mahjong = GetMahjongItemByValue(value);

            Mahjong.ShowNormal();

            MahjongManager.Instance.ExchangeByValue(value, Mahjong);

            MahjongList.Remove(Mahjong);

            SortMahjongForHand();

            if (GameConfig.GetInEffect)
            {
                PickUpMahjongAction(Mahjong);
            }
            else
            {
                SetMahjongPos();
            }

            MahjongManager.Instance.Recycle(Mahjong);

            LastGetIn = null;

            return(Mahjong);
        }