//Song song;
        public override void LoadContent(ContentManager contentManager, GraphicsContentLoader graphicsContentLoader)
        {
            this.graphicsContentLoader = graphicsContentLoader;

            levelScreen.LoadContent(contentManager);
            levelScreen.LoadContent(graphicsContentLoader);

            gameBackgroundTexture = graphicsContentLoader.Get("gameBackground");


            foreach (KeyValuePair <int, GameObject> keyValuePair in TheGame.Instance.gameObjects)
            {
                GameObject gameObject = keyValuePair.Value;
                gameObject.LoadContent(graphicsContentLoader);
            }



            //song = contentManager.Load<Song>("BGM");

            //MediaPlayer.IsRepeating = true;
            //MediaPlayer.Play(song);*


            TheGame.Instance.contentManager = contentManager;


            TheGame.Instance.playSound("BGM", true);
        }
Example #2
0
        public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
        {
            collisionTexture = graphicsContentLoader.Get("collision");
            rangeTexture     = graphicsContentLoader.Get("range");

            base.LoadContent(graphicsContentLoader);
        }
Example #3
0
        public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
        {
            textureOn  = graphicsContentLoader.Get("switchOn");
            textureOff = graphicsContentLoader.Get("switchOff");

            isInitialized = true;
        }
Example #4
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture = graphicsContentLoader.Get(textureLocation);
     foreach (MenuButton button in menuButtons)
     {
         button.texture = graphicsContentLoader.Get(button.textureLocation);
     }
     isInitialized = true;
 }
Example #5
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);
            graphicsContentLoader = new GraphicsContentLoader(Content);

            TheGame.Instance.spriteFont = Content.Load <SpriteFont>("SpriteFont");
            cursor.LoadContent(graphicsContentLoader);


            //load all the images we will need later. - cache them in the memory
            graphicsContentLoader.Load("bullet");
            graphicsContentLoader.Load("collision");
            graphicsContentLoader.Load("door");
            graphicsContentLoader.Load("gun");
            graphicsContentLoader.Load("guy");
            graphicsContentLoader.Load("key");
            graphicsContentLoader.Load("levelScreen");
            graphicsContentLoader.Load("platform");
            graphicsContentLoader.Load("player");
            graphicsContentLoader.Load("range");
            graphicsContentLoader.Load("choiceDoor");
            graphicsContentLoader.Load("goodDoor");
            graphicsContentLoader.Load("badDoor");
            graphicsContentLoader.Load("switchOff");
            graphicsContentLoader.Load("switchOn");
            graphicsContentLoader.Load("bullet");
            graphicsContentLoader.Load("hole");

            if (menu.isInitialized == false)
            {
                menu.LoadContent(graphicsContentLoader);
            }

            game.LoadContent(Content, graphicsContentLoader);
        }
Example #6
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture       = graphicsContentLoader.Get("Characters");
     isInitialized = true;
 }
Example #7
0
 public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager contentManager, GraphicsContentLoader graphicsContentLoader)
 {
     this.graphicsContentLoader = graphicsContentLoader;
     //TheGame.Instance.player1.LoadContent(graphicsContentLoader);
 }
Example #8
0
 public void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture = graphicsContentLoader.Get("cursor");
 }
Example #9
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     sprite.LoadContent(graphicsContentLoader);
 }
Example #10
0
 public abstract void LoadContent(GraphicsContentLoader graphicsContentLoader);
Example #11
0
 public abstract void LoadContent(ContentManager contentManager, GraphicsContentLoader graphicsContentLoader);
Example #12
0
        public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
        {
            texture = graphicsContentLoader.Get(textureLocation);

            isInitialized = true;
        }
Example #13
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture       = graphicsContentLoader.Get("bullet");
     isActive      = true;
     isInitialized = true;
 }