Exemple #1
0
        public override void Draw2()
        {
            spriteBatch.Draw(SK.texture_spritesheet_octacubes, SK.Position_OctaCubes() + new Vector2(32 - 16, 8 - 32 - 8 * score_level), new Rectangle(128, 0, 64, 48), Color.White * alpha, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            spriteBatch.Draw(SK.texture_spritesheet_octacubes, SK.Position_OctaCubes() + new Vector2(-32 - 16, 8 - 32 - 8 * score_level), new Rectangle(128, 0, 64, 48), Color.White * alpha, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            for (int y = 0; y < grid_main.GetLength(1); y++)
            {
                for (int x = 0; x < grid_main.GetLength(0); x++)
                {
                    if (grid_main[x, y] == 1)
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octacubes, SK.Position_OctaCubes() + new Vector2(32 * x - 32 * y - 16, 32 * x + 32 * y + 8 - 8 * score_level), new Rectangle(0, 0, 64, 48), Color.White * alpha, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                    if (grid_main[x, y] == 2)
                    {
                        spriteBatch.Draw(SK.texture_spritesheet_octacubes, SK.Position_OctaCubes() + new Vector2(32 * x - 32 * y - 16, 32 * x + 32 * y + 8 - 8 * score_level), new Rectangle(64, 0, 64, 48), Color.White * alpha, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
                    }
                }
            }
            foreach (Entity c in boulders)
            {
                spriteBatch.Draw(SK.texture_static_boulder, SK.Position_OctaCubes() + c.Get_GridPos() + new Vector2(0, -8 * score_level), Color.White * alpha);
            }
            if (octanom.Get_HP() > 0 && score_lives > 0)
            {
                spriteBatch.Draw(SK.texture_spritesheet_octanom_head, SK.Position_OctaCubes() + new Vector2(octanom.Get_GridPos().X, octanom.Get_GridPos().Y - 8 * score_level), new Rectangle(0, octanom.Get_LookDirection() * 32, 32, 32), Color.White * alpha, 0.0f, new Vector2(0, 0), 1, SpriteEffects.None, 0.0f);
            }

            foreach (Entity E in explosions)
            {
                spriteBatch.Draw(SK.texture_spritesheet_explosion, SK.Position_OctaCubes() + 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);
            }
        }