Beispiel #1
0
 public override void Render()
 {
     if (!LifeController.Destroyed)
     {
         Engine.Draw(Renderer.Texture, Transform.Position.X, Transform.Position.Y, Transform.Scale.X, Transform.Scale.Y, Transform.Rotation, Renderer.GetRealWidth() / 2, Renderer.GetRealHeight() / 2);
     }
 }
Beispiel #2
0
 public void Render()
 {
     Engine.Debug("TotalCoins:" + Coin.coin);
     Engine.Draw(backgroundTexture);
     Engine.Draw(escapeTexture, 50, 700, 0.5f, 0.5f);
     Engine.Draw(gameOverTexture, 150, 250);
 }
 public void Render()
 {
     Engine.Draw(TEXTURE_PATH, 0, 0);
     foreach (var button in buttons)
     {
         button.Render();
     }
 }
 private static void Render()
 {
     Engine.Clear();
     Engine.Draw("Png/Background/Fondo.jpeg");
     Engine.Draw("Png/Hud.png", 50, 0);
     GameManager.Instance.Render();
     Engine.Show();
 }
 public void Render()
 {
     Engine.Draw("Textures/Background/SPACE0");
     Player.Render();
     enemies.Render();
     coins.Render();
     fuels.Render();
 }
Beispiel #6
0
        public void drawText()
        {
            float xOffSet = 0;

            foreach (Texture texture in charTextures)
            {
                Engine.Draw(texture, x + xOffSet, y, scaleX, scaleY, 0, defaultFontWidth / 2, defaultfontHeight / 2);
                xOffSet += defaultFontWidth - defaultFontWidth * (1 - scaleX);
            }
        }
Beispiel #7
0
        public void Corazon()
        {
            float offset = 45;
            float x      = 780;

            for (int i = 1; i <= VidaManager.Instance.Vida; i++)
            {
                Engine.Draw("Texturas\\Vida\\Corazon.png", x, 20);
                x += offset;
            }
        }
Beispiel #8
0
        public void Render()
        {
            Engine.Draw(backgroundTexture);
            //Engine.Draw(titleTexture, 75, 50, 1f, 1f);

            foreach (var button in buttons)
            {
                button.Render();
            }
            arrow.Render();
        }
 public void Dibujar()
 {
     for (int fila = 0; fila < tiles.GetLength(0); fila++)
     {
         for (int col = 0; col < tiles.GetLength(1); col++)
         {
             int numeroTile = tiles[fila, col];
             if (numeroTile >= 0)
             {
                 float  posX = col * tamañoTile;
                 float  posY = fila * tamañoTile;
                 string tex  = texturas[numeroTile];
                 Engine.Draw(tex, posX, posY);
             }
         }
     }
 }
Beispiel #10
0
 public void DibujarTiles()
 {
     for (int i = 0; i < tilemap.tiles.GetLength(0); i++)
     {
         for (int j = 0; j < tilemap.tiles.GetLength(1); j++)
         {
             int numeroTile = tilemap.tiles[i, j];
             if (numeroTile >= 0)
             {
                 string texturaTile = tilemap.texturas[numeroTile];
                 int    x           = tamañoTile * j;
                 int    y           = tamañoTile * i;
                 Engine.Draw(texturaTile, x, y);
             }
         }
     }
 }
Beispiel #11
0
        public void Render()
        {
            Engine.Draw(currentAnimation.CurrentFrame);

            if (Player != null)
            {
                Player.Render();
            }
            for (int i = Bullets.Count - 1; i >= 0; i--)
            {
                Bullets[i].Render();
            }
            for (int i = Enemies.Count - 1; i >= 0; i--)
            {
                Enemies[i].Render();
            }
        }
Beispiel #12
0
        public void RenderNextFrame(float x, float y, float angle = 0)
        {
            if (loop)
            {
                if (Program.GetCurrentTime() / 1000f > lastFrame + speed)
                {
                    nextFrame++;
                    if (nextFrame >= frames.Count())
                    {
                        nextFrame = 0;
                    }

                    actualFrame = frames[nextFrame];
                    lastFrame   = Program.GetCurrentTime() / 1000f;
                }
            }
            Engine.Draw(actualFrame, x, y, 1, 1, angle, actualFrame.Width / 2, actualFrame.Height / 2);
        }
 public void Dibujar()
 {
     if (estadoActual == Estado.IdleIzq)
     {
         Engine.Draw(animIdleIzq.frames[animIdleIzq.actualFrame], x, y, 1, 1, 0f, ancho / 2, alto / 2);
     }
     else if (estadoActual == Estado.IdleDer)
     {
         Engine.Draw(animIdleDer.frames[animIdleDer.actualFrame], x, y, 1, 1, 0f, ancho / 2, alto / 2);
     }
     else if (estadoActual == Estado.CorrerIzq)
     {
         Engine.Draw(animCorrerIzq.frames[animCorrerIzq.actualFrame], x, y, 1, 1, 0f, ancho / 2, alto / 2);
     }
     else if (estadoActual == Estado.CorrerDer)
     {
         Engine.Draw(animCorrerDer.frames[animCorrerDer.actualFrame], x, y, 1, 1, 0f, ancho / 2, alto / 2);
     }
 }
Beispiel #14
0
        static void Draw()
        {
            Engine.Clear();

            if (actualState == States.MainMenu)
            {
                MenuManager.Instance.DrawManager();
            }
            else if (actualState == States.Game)
            {
                GameManager.Instance.DrawManager();
            }
            else if (actualState == States.Win)
            {
                Engine.Draw("Texturas/Menus/WinMenu.png");
            }
            else if (actualState == States.GameOver)
            {
                Engine.Draw("Texturas/Menus/LoseMenu.png");
            }

            Engine.Show();
        }
Beispiel #15
0
        public void Render()
        {
            if (hijoDer.ObtenerRaiz() != null)
            {
                new Linea(x, y, hijoDer.ObtenerRaiz().x, hijoDer.ObtenerRaiz().y).DibujarLinea();
            }
            if (hijoIzq.ObtenerRaiz() != null)
            {
                new Linea(x, y, hijoIzq.ObtenerRaiz().x, hijoIzq.ObtenerRaiz().y).DibujarLinea();
            }
            Engine.Draw("Textures/NodeCircle/001.png", x, y, xscale, yscale);
            string a;

            if (info < 10)
            {
                a = "0" + info.ToString();
            }
            else
            {
                a = info.ToString();
            }

            new Text(a, x + 28, y + 48, 24, 24).drawText();
        }
Beispiel #16
0
 public void Render()
 {
     Engine.Draw(renderer.Texture, transform.Position.X, transform.Position.X, transform.Scale.X, transform.Scale.Y, transform.Rotation, renderer.GetRealWidth() / 2, renderer.GetRealHeight() / 2);
 }
Beispiel #17
0
 public void Draw()
 {
     Engine.Draw(PathImg, PosX, PosY);
 }
Beispiel #18
0
 public void Dibujar()
 {
     Engine.Draw(texture, posX, posY);
 }
Beispiel #19
0
 public void MapNivel2()
 {
     Engine.Draw(fondo);
     tilemap.Dibujar();
 }
Beispiel #20
0
 public void Dibujar()
 {
     Engine.Draw("Texturas/Menu/lose.png");
 }
Beispiel #21
0
 public virtual void Draw()
 {
     Engine.Draw(PathImg, PosX, PosY, ScaleImg, ScaleImg);
 }
Beispiel #22
0
        public void Dibujar()
        {
            Engine.Draw("Texturas/Menu/menu.png");

            flecha.Dibujar();
        }
Beispiel #23
0
 public void DibujarLinea()
 {
     list.ForEach(punto => Engine.Draw("Textures/Pixel.png", punto.x, punto.y));
 }
Beispiel #24
0
 public void Render()
 {
     Engine.Draw(backgroundTexture);
     Engine.Draw(creditsTexture, 75, 100);
     Engine.Draw(escapeTexture, 50, 700, 0.5f, 0.5f);
 }
Beispiel #25
0
 public void Draw()
 {
     Engine.Draw(_pathImg, _posX, _posY);
 }
Beispiel #26
0
 public void Render()
 {
     Engine.Draw("Textures/Scenes/Menu/ArrowIndicator.png", posX, posY, 1f, 1f, 0, 0, 0);
 }
Beispiel #27
0
 public override void Render()
 {
     Engine.Draw(Renderer.Texture, Transform.Position.X, Transform.Position.Y, Transform.Scale.X, Transform.Scale.Y, 0, Renderer.GetRealWidth() / 2, Renderer.GetRealHeight() / 2);
 }
 public void Draw()
 {
     Engine.Draw(PathImg, transform.PosX, transform.PosY, transform.Scale, transform.Scale);
 }
Beispiel #29
0
 public void Render()
 {
     Engine.Draw(backgroundTexture);
     Engine.Draw(escapeTexture, 50, 700, 0.5f, 0.5f);
     Engine.Draw(gameOverTexture, 150, 250);
 }
 public void Render()
 {
     Engine.Draw(currentAnimation.CurrentFrame, Position.X, Position.Y, scale, scale, angle, GetOffSetX(), GetOffSetY());
 }