Esempio n. 1
0
        /// <summary>
        /// Load your graphics content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a sprite batch to draw those textures
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            Skins();
            //default skint
            skin = skin1;

            difficulty = Difficulty.Easy;

            InitiateLoad();
            mapTexture = skin.mapTexture;

            //check if images exists;
            try
            {
                mapTexture     = skin.mapTexture;
                mapGradTexture = Content.Load <Texture2D>("image\\mapgrad");
                //fonts
                fontArial10 = Content.Load <SpriteFont>("fonts\\Arial10");
            }
            catch
            {
                MyExit();
            }
            if (mapTexture == null || mapGradTexture == null || fontArial10 == null)
            {
                MyExit();
            }

            mapGradTextureData = new Color[mapGradTexture.Width * mapGradTexture.Height];
            mapGradTexture.GetData(mapGradTextureData);

            // Get the bounding rectangle of this block
            mapRectangle = new Rectangle(0, 0, skin.mapTexture.Width, skin.mapTexture.Height);

            finishMapRectangle = new Rectangle(457, 335, 1, 130);

            //Creating and adding checkpointto list
            CheckPoints();
            winner = new StringBuilder();
            //fps counter
            fpsMonitor = new FpsMonitor();
            keyUup     = false;
            keyYup     = false;
            keyIup     = false;
            keyKup     = false;
        }
Esempio n. 2
0
        /// <summary>
        /// Load your graphics content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a sprite batch to draw those textures
            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
            Skins();
            //default skint
            skin = skin1;

            difficulty = Difficulty.Easy;

            InitiateLoad();
            mapTexture = skin.mapTexture;

            //check if images exists;
            try
            {
                mapTexture = skin.mapTexture;
                mapGradTexture = Content.Load<Texture2D>("image\\mapgrad");
                //fonts
                fontArial10 = Content.Load<SpriteFont>("fonts\\Arial10");
            }
            catch
            {
                MyExit();
            }
            if (mapTexture == null || mapGradTexture == null || fontArial10 == null)
            {
                MyExit();
            }

            mapGradTextureData = new Color[mapGradTexture.Width * mapGradTexture.Height];
            mapGradTexture.GetData(mapGradTextureData);

            // Get the bounding rectangle of this block
            mapRectangle = new Rectangle(0, 0, skin.mapTexture.Width, skin.mapTexture.Height);

            finishMapRectangle = new Rectangle(457, 335, 1, 130);

            //Creating and adding checkpointto list
            CheckPoints();
            winner = new StringBuilder();
            //fps counter
            fpsMonitor = new FpsMonitor();
            keyUup = false;
            keyYup = false;
            keyIup = false;
            keyKup = false;
        }