예제 #1
0
파일: Game.cs 프로젝트: dahopkin/Tetris
        } // end method CheckToRaiseLevel

        #endregion

        #region "Go To Next Shape" Methods
        /// <summary>
        /// This method will add a shape to the pile
        /// </summary>
        private void CheckToAddShapeToPile()
        {
            if (currentShape != null)
            {
                if (!ShapeCanMoveDown())
                {
                    //if (HasLines()) skipLockDelay = true;

                    if (!skipLockDelay && !lockDelay.Active)
                    {
                        lockDelay.Start();
                    }

                    if (skipLockDelay || lockDelay.Expired())
                    {
                        gridPile.AddShapeToPile(currentShape);
                        Score       += 17;
                        currentShape = null;
                        if (skipLockDelay)
                        {
                            skipLockDelay = false;
                        }
                        if (lockDelay.Expired())
                        {
                            lockDelay.Reset();
                        }
                    }
                }
            }
        } // end method CheckToAddShapeToPile
예제 #2
0
 /// <summary>
 /// This method makes the block start flashing.
 /// </summary>
 public void StartFlashing()
 {
     BlockFlashing.Start();
 }