Пример #1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Ladataan kuvia yms
            this.taustaKuva = Content.Load <Texture2D>("Textures\\vuoria");

            this.walkSurface = Content.Load <Texture2D>("Textures\\weed");
            this.start1      = Content.Load <Texture2D>("Textures\\start_01");
            this.start2      = Content.Load <Texture2D>("Textures\\start_02");
            this.start3      = Content.Load <Texture2D>("Textures\\start_03");

            this.house = Content.Load <Texture2D>("Textures\\house");
            this.tree  = Content.Load <Texture2D>("Textures\\ebinTree2");

            this.fontti  = Content.Load <SpriteFont>("Fonts\\fontti1");
            this.fontti2 = Content.Load <SpriteFont>("Fonts\\fontti2");

            //Loading content for enemy?

            //Red "filter" for game-over screen
            this.filter    = Content.Load <Texture2D>("Textures\\filterTest");
            this.estexture = Content.Load <Texture2D>("Textures\\es");

            //Load Content for main Character
            viking.LoadContent(Content, GraphicsDevice);
            //Load Content for menus
            menu.LoadContent(Content);
            //Load Content for dying/game over
            theend.LoadContent(Content);
            //Load healthbar textures
            health.LoadContent(Content);

            goal.LoadContent(Content);
        }