Ejemplo n.º 1
0
        public void HoldNow()
        {
            if (FallingBlockSet == null)
            {
                return;
            }
            if (!Held)
            {
                FallingTimer.Stop();

                FallingBlockSet.Initial();
                if (FallingBlockSet is BlocksS || FallingBlockSet is BlocksT || FallingBlockSet is BlocksZ)
                {
                    FallingBlockSet.SetOrigin(BombingPointX, -1);
                }
                else
                {
                    FallingBlockSet.SetOrigin(BombingPointX, 0);
                }

                if (BlockSetHold != null)
                {
                    BlockSet bs = BlockSetHold;
                    BlockSetHold    = FallingBlockSet;
                    FallingBlockSet = bs;
                }
                else
                {
                    BlockSetHold    = FallingBlockSet;
                    FallingBlockSet = NextBlockSet();
                }

                Held = true;
                Show();
                FallingTimer.Start();
            }
        }