예제 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            menuSelect = Content.Load <SoundEffect>("Audio/UI/menuSelect");

            hud   = new HUD(level);
            level = new Level(this, hud);
            hud.SetLevel(level);

            level.LoadContent(spriteBatch, Content);
            hud.LoadContent(spriteBatch, Content);
        }
예제 #2
0
        public void LoadContent(SpriteBatch sb, ContentManager content)
        {
            resources = new CommonResources();

            skyBg0               = content.Load <Texture2D>("Sprites/Background/skybg0");
            skyBg1               = content.Load <Texture2D>("Sprites/Background/skybg1");
            skyBg2               = content.Load <Texture2D>("Sprites/Background/skybg2");
            skyBg3               = content.Load <Texture2D>("Sprites/Background/skybg3");
            eveningBg0           = content.Load <Texture2D>("Sprites/Background/eveningbg0");
            eveningBg1           = content.Load <Texture2D>("Sprites/Background/eveningbg1");
            eveningBg2           = content.Load <Texture2D>("Sprites/Background/eveningbg2");
            eveningBg3           = content.Load <Texture2D>("Sprites/Background/eveningbg3");
            eveningTransitionBg0 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg0");
            eveningTransitionBg1 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg1");
            eveningTransitionBg2 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg2");
            eveningTransitionBg3 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg3");
            eveningTransitionBg4 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg4");
            eveningTransitionBg5 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg5");
            eveningTransitionBg6 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg6");
            eveningTransitionBg7 = content.Load <Texture2D>("Sprites/Background/eveningtransitionbg7");
            spaceBg0             = content.Load <Texture2D>("Sprites/Background/spacebg0");
            spaceBg1             = content.Load <Texture2D>("Sprites/Background/spacebg1");
            spaceBg2             = content.Load <Texture2D>("Sprites/Background/spacebg2");
            spaceBg3             = content.Load <Texture2D>("Sprites/Background/spacebg3");
            spaceTransitionBg0   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg0");
            spaceTransitionBg1   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg1");
            spaceTransitionBg2   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg2");
            spaceTransitionBg3   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg3");
            spaceTransitionBg4   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg4");
            spaceTransitionBg5   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg5");
            spaceTransitionBg6   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg6");
            spaceTransitionBg7   = content.Load <Texture2D>("Sprites/Background/spacetransitionbg7");
            moon = content.Load <Texture2D>("Sprites/Background/moon");

            InitializeBgArray();

            player.LoadContent(sb, content);
            hud.LoadContent(sb, content);
            resources.LoadContent(sb, content);
        }
예제 #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            menuSelect = Content.Load<SoundEffect>("Audio/UI/menuSelect");

            hud = new HUD(level);
            level = new Level(this, hud);
            hud.SetLevel(level);

            level.LoadContent(spriteBatch, Content);
            hud.LoadContent(spriteBatch, Content);
        }