Ejemplo n.º 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());
     }
 }
Ejemplo n.º 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());
     }
 }
Ejemplo n.º 4
0
 public FlameCell GetFlame()
 {
     return(staticCell != null?staticCell.AsFlame() : null);
 }