/// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (InsoGame game = new InsoGame())
     {
         game.Run();
     }
 }
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (InsoGame game = new InsoGame())
     {
         game.Run();
     }
 }
        public static void Initialise(InsoGame insoGame)
        {
            theGame = insoGame;



            Backgrounds = new BackgroundObjectLibrary();
            TextureLibrary.Initialise(theGame.GraphicsDevice);
            debugFont = insoGame.Content.Load <SpriteFont>("Spritefonts/debug");

            EarthTile.GroundSectionTextures = new SpriteSheet[]
            {
                TextureLibrary.GetSpriteSheet("section"),
            };

            ShurikenReceiver.ImpactTexture = TextureLibrary.GetSpriteSheet("shuriken_impacteffect", 1, 4);

            //Destructible.MiniFireTexture = TextureLibrary.GetSpriteSheet("minifire", 1, 4);

            //FireworkSpark.SparkTexture = InsoGame.Pixel;
            //FireworkBlast.ParticleTextures = new SpriteSheet[] {
            //    TextureLibrary.GetSpriteSheet("firework_blastp"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_2"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_3"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_4"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_5"),
            //};
            //FireworkBlastParticle.BackgroundTexture = TextureLibrary.GetSpriteSheet("firework_blastp_b");
            //FireworkBlast.HaloTexture = TextureLibrary.GetSpriteSheet("firework_halo");
            //PointDigit.IndicatorTexture = TextureLibrary.GetSpriteSheet("counter_vertical");
            //House.GroundTexture = TextureLibrary.GetSpriteSheet("section_1");
            //Tpl_Enemy.DefaultThumbnail = TextureLibrary.GetSpriteSheet("thb_default");
            //BurnSmoke.SmokeTexture = TextureLibrary.GetSpriteSheet("smoke1");
            //Confetti.ConfettiTexture = TextureLibrary.GetSpriteSheet("confetti", 1, 4);
            Coin.CoinTextures = new SpriteSheet[]
            {
                TextureLibrary.GetSpriteSheet("coin_copper", 1, 6),
                TextureLibrary.GetSpriteSheet("coin_silver", 1, 6),
                TextureLibrary.GetSpriteSheet("coin_gold", 1, 6),
            };
            //StackCoin.StackCoinTextures = new Texture2D[]
            //{
            //    TextureLibrary.GetSpriteSheet("coin_copper_pile"),
            //    TextureLibrary.GetSpriteSheet("coin_silver_pile"),
            //    TextureLibrary.GetSpriteSheet("coin_gold_pile"),
            //};
            //Ts_BaseZombie.ZombieTombStoneTextures = new Texture2D[]
            //{
            //    TextureLibrary.GetSpriteSheet("ts_bz_1"),
            //    TextureLibrary.GetSpriteSheet("ts_bz_2"),
            //};
        }
        public static void Initialise(InsoGame game)
        {
            Matrix projection      = Matrix.CreateOrthographicOffCenter(0, game.ScreenWidth, game.ScreenHeight, 0, 0, 1);
            Matrix halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);


            baseEffect = game.Content.Load <Effect>("Effects/Flash");

            //customEffect.Parameters["World"].SetValue(Matrix.Identity);
            //customEffect.Parameters["View"].SetValue(Matrix.Identity);
            //customEffect.Parameters["Projection"].SetValue(halfPixelOffset * projection);



            Vector2 focusPoint = new Vector2(Globals.TheGame.ScreenWidth * 0.5f, Globals.TheGame.ScreenHeight * 0.5f);

            cam_Main             = new Camera2D(focusPoint);
            cam_Main.ScaleToZoom = true;

            for (int i = 0; i < backgroundZoomLevels.Length; ++i)
            {
                backgroundZoomLevels[i] = (BaseBgZoom + (float)(i + 1) / (float)backgroundZoomLevels.Length) + ExtraBgZoom;
            }

            cam_BgBack                           = new Camera2D(focusPoint);
            cam_BgBack.ScaleToZoom               = true;
            cam_BgBack.Transform.ScaleUniform    = 0.25f;
            cam_BgBack.Transform.ParentTransform = cam_Main.Transform;

            cam_BgMiddle                           = new Camera2D(focusPoint);
            cam_BgMiddle.ScaleToZoom               = true;
            cam_BgMiddle.Transform.ScaleUniform    = 0.5f;
            cam_BgMiddle.Transform.ParentTransform = cam_Main.Transform;

            cam_BgFront                           = new Camera2D(focusPoint);
            cam_BgFront.ScaleToZoom               = true;
            cam_BgFront.Transform.ScaleUniform    = 0.75f;
            cam_BgFront.Transform.ParentTransform = cam_Main.Transform;

            UL_Global       = new UpdateList();
            DL_EarthTiles   = new DrawingList();
            DL_House        = new DrawingList();
            DL_GroundItems  = new DrawingList();
            DL_MiddleGround = new DrawingList();
            DL_BgLayers[0]  = new DrawingList();
            DL_BgLayers[1]  = new DrawingList();
            DL_BgLayers[2]  = new DrawingList();
            DL_ItemDrops    = new DrawingList();
            DL_Foreground   = new DrawingList();
            DL_Backpackers  = new DrawingList();
        }
        public static void Initialise(InsoGame insoGame)
        {
            theGame = insoGame;

            Backgrounds = new BackgroundObjectLibrary();
            TextureLibrary.Initialise(theGame.GraphicsDevice);
            debugFont = insoGame.Content.Load<SpriteFont>("Spritefonts/debug");

            EarthTile.GroundSectionTextures = new SpriteSheet[]
            {
                TextureLibrary.GetSpriteSheet("section"),
            };

            ShurikenReceiver.ImpactTexture = TextureLibrary.GetSpriteSheet("shuriken_impacteffect", 1, 4);

            //Destructible.MiniFireTexture = TextureLibrary.GetSpriteSheet("minifire", 1, 4);

            //FireworkSpark.SparkTexture = InsoGame.Pixel;
            //FireworkBlast.ParticleTextures = new SpriteSheet[] {
            //    TextureLibrary.GetSpriteSheet("firework_blastp"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_2"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_3"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_4"),
            //    TextureLibrary.GetSpriteSheet("firework_blastp_5"),
            //};
            //FireworkBlastParticle.BackgroundTexture = TextureLibrary.GetSpriteSheet("firework_blastp_b");
            //FireworkBlast.HaloTexture = TextureLibrary.GetSpriteSheet("firework_halo");
            //PointDigit.IndicatorTexture = TextureLibrary.GetSpriteSheet("counter_vertical");
            //House.GroundTexture = TextureLibrary.GetSpriteSheet("section_1");
            //Tpl_Enemy.DefaultThumbnail = TextureLibrary.GetSpriteSheet("thb_default");
            //BurnSmoke.SmokeTexture = TextureLibrary.GetSpriteSheet("smoke1");
            //Confetti.ConfettiTexture = TextureLibrary.GetSpriteSheet("confetti", 1, 4);
            Coin.CoinTextures = new SpriteSheet[]
            {
                TextureLibrary.GetSpriteSheet("coin_copper", 1, 6),
                TextureLibrary.GetSpriteSheet("coin_silver", 1, 6),
                TextureLibrary.GetSpriteSheet("coin_gold", 1, 6),
            };
            //StackCoin.StackCoinTextures = new Texture2D[]
            //{
            //    TextureLibrary.GetSpriteSheet("coin_copper_pile"),
            //    TextureLibrary.GetSpriteSheet("coin_silver_pile"),
            //    TextureLibrary.GetSpriteSheet("coin_gold_pile"),
            //};
            //Ts_BaseZombie.ZombieTombStoneTextures = new Texture2D[]
            //{
            //    TextureLibrary.GetSpriteSheet("ts_bz_1"),
            //    TextureLibrary.GetSpriteSheet("ts_bz_2"),
            //};
        }
        public static void Initialise(InsoGame game)
        {
            Matrix projection = Matrix.CreateOrthographicOffCenter(0, game.ScreenWidth, game.ScreenHeight, 0, 0, 1);
            Matrix halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);

            baseEffect = game.Content.Load<Effect>("Effects/Flash");

            //customEffect.Parameters["World"].SetValue(Matrix.Identity);
            //customEffect.Parameters["View"].SetValue(Matrix.Identity);
            //customEffect.Parameters["Projection"].SetValue(halfPixelOffset * projection);

            Vector2 focusPoint = new Vector2(Globals.TheGame.ScreenWidth * 0.5f, Globals.TheGame.ScreenHeight * 0.5f);

            cam_Main = new Camera2D(focusPoint);
            cam_Main.ScaleToZoom = true;

            for (int i = 0; i < backgroundZoomLevels.Length; ++i)
                backgroundZoomLevels[i] = (BaseBgZoom + (float)(i + 1) / (float)backgroundZoomLevels.Length) + ExtraBgZoom;

            cam_BgBack = new Camera2D(focusPoint);
            cam_BgBack.ScaleToZoom = true;
            cam_BgBack.Transform.ScaleUniform = 0.25f;
            cam_BgBack.Transform.ParentTransform = cam_Main.Transform;

            cam_BgMiddle = new Camera2D(focusPoint);
            cam_BgMiddle.ScaleToZoom = true;
            cam_BgMiddle.Transform.ScaleUniform = 0.5f;
            cam_BgMiddle.Transform.ParentTransform = cam_Main.Transform;

            cam_BgFront = new Camera2D(focusPoint);
            cam_BgFront.ScaleToZoom = true;
            cam_BgFront.Transform.ScaleUniform = 0.75f;
            cam_BgFront.Transform.ParentTransform = cam_Main.Transform;

            UL_Global = new UpdateList();
            DL_EarthTiles = new DrawingList();
            DL_House = new DrawingList();
            DL_GroundItems = new DrawingList();
            DL_MiddleGround = new DrawingList();
            DL_BgLayers[0] = new DrawingList();
            DL_BgLayers[1] = new DrawingList();
            DL_BgLayers[2] = new DrawingList();
            DL_ItemDrops = new DrawingList();
            DL_Foreground = new DrawingList();
            DL_Backpackers = new DrawingList();
        }