Exemplo n.º 1
0
 public void ShapeMove(Shape shape)
 {
     if (this.IsMoveable(shape))//判断是否遇到障碍物或者是碰到底边
     {
         shape.MoveDown(g);
     }
     else//遇到障碍物或者到底
     {
         ground.KillAShape(shape); //将形状变成障碍物
         ground.CheckAndDeleteFullRow();
         if (ground.IsGameOver(shape))
         {
             UIControl.GameOver();
         }
         else
         {
             this.shape = factory.GetAShape();
             this.ReDisplay(this.shape);
             this.shape.AddShapeListtener(this);
         }
     }
 }