Esempio n. 1
0
        public override void Draw2()
        {
            spriteBatch.Draw(SK.texture_background_grid32, SK.Position_DisplayEdge() + SK.Position_BackgroundGrid(), Color.White);
            if (SK.orientation <= 2)
            {
                for (int x = 0; x < 28; x++)
                {
                    for (int y = 0; y < 23; y++)
                    {
                        if (field[y] == 0)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * x, 32 * y), new Rectangle(32 * 2, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                        if (field[y] == 1)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * x, 32 * y), new Rectangle(32 * 3, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                        if (field[y] == 2)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * x, 32 * y), new Rectangle(32 * 4, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                    }
                }
                foreach (Entity c in lilypad)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octanom_tail, SK.Position_DisplayEdge() + SK.Position_Grid32() + c.Get_Pos(), new Rectangle(0, 0, 32, 32), Color.LightGreen, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }
                foreach (Entity c in crate)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + c.Get_Pos(), new Rectangle(0, 32, 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                if (octanom.Get_HP() > 0)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octanom_head, SK.Position_DisplayEdge() + SK.Position_Grid32() + octanom.Get_Pos(), new Rectangle(0, octanom.Get_LookDirection() * (32), 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                foreach (Entity c in trianom)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + c.Get_Pos(), new Rectangle(0, c.Get_LookDirection() * (32), 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                foreach (Entity E in explosions)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_explosion, SK.Position_DisplayEdge() + SK.Position_Grid32() + E.Get_Pos() - new Vector2(16), new Rectangle(1 + E.Get_HP() + (64 * (E.Get_HP() / 2)), 1, 64, 64), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    E.Change_HP(1);
                }
            }
            else
            {
                for (int x = 0; x < 28; x++)
                {
                    for (int y = 0; y < 23; y++)
                    {
                        if (field[y] == 0)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * y, 32 * (27 - x)), new Rectangle(32 * 2, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                        if (field[y] == 1)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * y, 32 * (27 - x)), new Rectangle(32 * 3, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                        if (field[y] == 2)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(32 * y, 32 * (27 - x)), new Rectangle(32 * 4, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                        }
                    }
                }
                foreach (Entity c in lilypad)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octanom_tail, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(c.Get_Pos().Y, 27 * 32 - c.Get_Pos().X), new Rectangle(0, 0, 32, 32), Color.LightGreen, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }
                foreach (Entity c in crate)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(c.Get_Pos().Y, 27 * 32 - c.Get_Pos().X), new Rectangle(0, 32, 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                if (octanom.Get_HP() > 0)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_octanom_head, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(octanom.Get_Pos().Y, 27 * 32 - octanom.Get_Pos().X), new Rectangle(0, octanom.Get_LookDirection() * (32), 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                foreach (Entity c in trianom)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + new Vector2(c.Get_Pos().Y, 27 * 32 - c.Get_Pos().X), new Rectangle(0, c.Get_LookDirection() * (32), 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                }

                foreach (Entity E in explosions)
                {
                    spriteBatch.Draw(SK.texture_spritesheet_explosion, SK.Position_DisplayEdge() + new Vector2(E.Get_Pos().Y - 16, E.Get_Pos().X - 16 - 27 * 32), new Rectangle(1 + E.Get_HP() + (64 * (E.Get_HP() / 2)), 1, 64, 64), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    E.Change_HP(1);
                }
            }
        }
Esempio n. 2
0
        public override void Draw2()
        {
            spriteBatch.Draw(SK.texture_background_grid32, SK.Position_DisplayEdge() + SK.Position_BackgroundGrid(), Color.White);

            for (int x = 0; x < 28; x++)
            {
                for (int y = 0; y < 23; y++)
                {
                    if (grid_main[x, y])
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(0, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                    if (grid_points[x, y])
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_coin, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(0, 64, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                    if (grid_power[x, y])
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_coin, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(0, 32, 32, 32), Color.LightBlue, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                }
            }

            Color color = Color.White;

            if (powerup)
            {
                color = Color.Blue;
            }

            if (!active_gameover)
            {
                spriteBatch.Draw(SK.texture_spritesheet_octanom_head, SK.Position_DisplayEdge() + SK.Position_Grid32() + octanom.Get_GridPos(SK.orientation), new Rectangle(0, octanom.Get_LookDirection(SK.orientation) * (32), 32, 32), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            }
            spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + trianom[0].Get_GridPos(SK.orientation), new Rectangle(0, trianom[0].Get_LookDirection(SK.orientation) * (32), 32, 32), color, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + trianom[1].Get_GridPos(SK.orientation), new Rectangle(0, trianom[1].Get_LookDirection(SK.orientation) * (32), 32, 32), color, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + trianom[2].Get_GridPos(SK.orientation), new Rectangle(0, trianom[2].Get_LookDirection(SK.orientation) * (32), 32, 32), color, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            spriteBatch.Draw(SK.texture_spritesheet_trianom, SK.Position_DisplayEdge() + SK.Position_Grid32() + trianom[3].Get_GridPos(SK.orientation), new Rectangle(0, trianom[3].Get_LookDirection(SK.orientation) * (32), 32, 32), color, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);

            for (int x = 0; x < 28; x++)
            {
                for (int y = 0; y < 23; y++)
                {
                    if (grid_gate[x, y])
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(32, 0, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                    if (position_octanom_start == new Vector2(x, y))
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(64, 32, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                    if (position_trianom_start == new Vector2(x, y))
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octagames, SK.Position_DisplayEdge() + SK.Position_Grid32() + Get_GridPos(x, y), new Rectangle(96, 32, 32, 32), Color.WhiteSmoke, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                }
            }

            foreach (Entity E in explosions)
            {
                spriteBatch.Draw(SK.texture_spritesheet_explosion, SK.Position_DisplayEdge() + SK.Position_Grid32() + E.Get_GridPos(SK.orientation) - new Vector2(16), new Rectangle(1 + E.Get_HP() / 2 + (64 * (E.Get_HP() / 2)), 1, 64, 64), Color.White, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                E.Change_HP(1);
            }
        }
Esempio n. 3
0
 public override void Draw2()
 {
     if (SK.orientation <= 2)
     {
         spriteBatch.Draw(SK.texture_background_grid64, SK.Position_DisplayEdge() + SK.Position_BackgroundGrid() + new Vector2(32, 0), Color.White);
     }
     else
     {
         spriteBatch.Draw(SK.texture_background_grid64, SK.Position_DisplayEdge() + SK.Position_BackgroundGrid() + new Vector2(0, 32), Color.White);
     }
     //spriteBatch.Draw(SK.texture_background_2048, SK.Position_DisplayEdge() + SK.Position_2048(), Color.DarkGray);
 }