예제 #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);
     }
 }
예제 #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();
 }
예제 #5
0
 public void Render()
 {
     Engine.Draw("Textures/Background/SPACE0");
     Player.Render();
     enemies.Render();
     coins.Render();
     fuels.Render();
 }
예제 #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);
            }
        }
예제 #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;
            }
        }
예제 #8
0
        public void Render()
        {
            Engine.Draw(backgroundTexture);
            //Engine.Draw(titleTexture, 75, 50, 1f, 1f);

            foreach (var button in buttons)
            {
                button.Render();
            }
            arrow.Render();
        }
예제 #9
0
 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);
             }
         }
     }
 }
예제 #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);
             }
         }
     }
 }
예제 #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();
            }
        }
예제 #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);
        }
예제 #13
0
 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);
     }
 }
예제 #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();
        }
예제 #15
0
파일: NodoABB.cs 프로젝트: Jallill/Progra2
        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();
        }
예제 #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);
 }
예제 #17
0
 public void Draw()
 {
     Engine.Draw(PathImg, PosX, PosY);
 }
예제 #18
0
 public void Dibujar()
 {
     Engine.Draw(texture, posX, posY);
 }
예제 #19
0
 public void MapNivel2()
 {
     Engine.Draw(fondo);
     tilemap.Dibujar();
 }
예제 #20
0
 public void Dibujar()
 {
     Engine.Draw("Texturas/Menu/lose.png");
 }
예제 #21
0
 public virtual void Draw()
 {
     Engine.Draw(PathImg, PosX, PosY, ScaleImg, ScaleImg);
 }
예제 #22
0
        public void Dibujar()
        {
            Engine.Draw("Texturas/Menu/menu.png");

            flecha.Dibujar();
        }
예제 #23
0
 public void DibujarLinea()
 {
     list.ForEach(punto => Engine.Draw("Textures/Pixel.png", punto.x, punto.y));
 }
예제 #24
0
 public void Render()
 {
     Engine.Draw(backgroundTexture);
     Engine.Draw(creditsTexture, 75, 100);
     Engine.Draw(escapeTexture, 50, 700, 0.5f, 0.5f);
 }
예제 #25
0
 public void Draw()
 {
     Engine.Draw(_pathImg, _posX, _posY);
 }
예제 #26
0
 public void Render()
 {
     Engine.Draw("Textures/Scenes/Menu/ArrowIndicator.png", posX, posY, 1f, 1f, 0, 0, 0);
 }
예제 #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);
 }
예제 #28
0
 public void Draw()
 {
     Engine.Draw(PathImg, transform.PosX, transform.PosY, transform.Scale, transform.Scale);
 }
예제 #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());
 }