예제 #1
0
 private void DrawCell(Context context, FieldCell cell)
 {
     if (cell.IsBrick())
     {
         DrawBrick(context, cell.AsBrick());
     }
     else if (cell.IsSolid())
     {
         DrawSolid(context, cell);
     }
     else if (cell.IsBomb())
     {
         DrawBomb(context, cell.AsBomb());
     }
     else if (cell.IsFlame())
     {
         DrawFlame(context, cell.AsFlame());
     }
     else if (cell.IsPowerup())
     {
         DrawPowerup(context, cell.AsPowerup());
     }
     else if (cell.IsPlayer())
     {
         DrawPlayer(context, cell.AsPlayer());
     }
 }
예제 #2
0
        protected override bool HandleStaticCollision(FieldCell other)
        {
            if (other.IsFlame())
            {
                return HandleCollision(other.AsFlame());
            }

            if (other.IsPowerup())
            {
                return HandleCollision(other.AsPowerup());
            }

            return HandleObstacleCollistion(other);
        }
 private void DrawCell(Context context, FieldCell cell)
 {
     if (cell.IsBrick())
     {
         DrawBrick(context, cell.AsBrick());
     }
     else if (cell.IsSolid())
     {
         DrawSolid(context, cell);
     }
     else if (cell.IsBomb())
     {
         DrawBomb(context, cell.AsBomb());
     }
     else if (cell.IsFlame())
     {
         DrawFlame(context, cell.AsFlame());
     }
     else if (cell.IsPowerup())
     {
         DrawPowerup(context, cell.AsPowerup());
     }
     else if (cell.IsPlayer())
     {
         DrawPlayer(context, cell.AsPlayer());
     }
 }