Ejemplo n.º 1
0
 public override void Draw(int ticks)
 {
     this.X++;
     if (this.X > 40)
     {
         this.X = 30;
     }
     if (ticks % 2 == 1)
     {
         for (int i = 1; i <= 5; i++)
         {
             for (int j = 1; j <= 5; j++)
             {
                 if (j >= i)
                 {
                     Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.Green);
                 }
             }
         }
     }
     else
     {
         for (int i = 1; i <= 5; i++)
         {
             for (int j = 1; j <= 5; j++)
             {
                 if (j <= i)
                 {
                     Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.Cyan);
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 public override void Draw(int ticks)
 {
     this.X++;
     if (this.X > 20)
     {
         this.X = 10;
     }
     if (ticks % 2 == 0)
     {
         for (int i = 1; i <= 5; i++)
         {
             for (int j = 1; j <= 5; j++)
             {
                 if (i >= j && i >= 6 - j)
                 {
                     Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.Yellow);
                 }
             }
         }
     }
     else
     {
         for (int i = 1; i <= 5; i++)
         {
             for (int j = 1; j <= 5; j++)
             {
                 if (i <= j && i <= 6 - j)
                 {
                     Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.Blue);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
        public override void Draw(int ticks)
        {
            this.X++;
            if (this.X > 70)
            {
                this.X = 10;
            }

            if (ticks % 2 == 1)
            {
                Engine2D.SetPixel(this.X - 1, this.Y - 1, this.Color);
                Engine2D.SetPixel(this.X + 1, this.Y - 1, this.Color);
                Engine2D.SetPixel(this.X - 1, this.Y + 1, this.Color);
                Engine2D.SetPixel(this.X + 1, this.Y + 1, this.Color);
                Engine2D.SetPixel(this.X, this.Y, this.Color);
            }
            else
            {
                Engine2D.SetPixel(this.X - 1, this.Y, this.Color);
                Engine2D.SetPixel(this.X + 1, this.Y, this.Color);
                Engine2D.SetPixel(this.X, this.Y - 1, this.Color);
                Engine2D.SetPixel(this.X, this.Y + 1, this.Color);
                Engine2D.SetPixel(this.X, this.Y, this.Color);
            }
        }
Ejemplo n.º 4
0
 public override void Draw(int ticks)
 {
     this.X++;
     if (this.X > 30)
     {
         this.X = 20;
     }
     if (ticks % 2 == 1)
     {
         for (int i = 0; i < 5; i++)
         {
             for (int j = 0; j < 5; j++)
             {
                 Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.White);
             }
         }
     }
     else
     {
         for (int i = 1; i <= 5; i++)
         {
             for (int j = 1; j <= 5; j++)
             {
                 if ((j >= i && j >= 6 - i) || (j <= i && j <= 6 - i))
                 {
                     Engine2D.SetPixel(this.X + i, this.Y + j, this.Color = ConsoleColor.Red);
                 }
             }
         }
     }
 }
Ejemplo n.º 5
0
 public override void Draw(int ticks)
 {
     Engine2D.SetPixel(this.X - 1, this.Y, this.Color);
     Engine2D.SetPixel(this.X + 1, this.Y, this.Color);
     Engine2D.SetPixel(this.X, this.Y - 1, this.Color);
     Engine2D.SetPixel(this.X, this.Y + 1, this.Color);
     Engine2D.SetPixel(this.X, this.Y, this.Color);
 }