Ejemplo n.º 1
0
        //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);
        }
Ejemplo n.º 2
0
        public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
        {
            collisionTexture = graphicsContentLoader.Get("collision");
            rangeTexture     = graphicsContentLoader.Get("range");

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

            isInitialized = true;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture       = graphicsContentLoader.Get("Characters");
     isInitialized = true;
 }
Ejemplo n.º 7
0
 public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager contentManager, GraphicsContentLoader graphicsContentLoader)
 {
     this.graphicsContentLoader = graphicsContentLoader;
     //TheGame.Instance.player1.LoadContent(graphicsContentLoader);
 }
Ejemplo n.º 8
0
 public void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     texture = graphicsContentLoader.Get("cursor");
 }
Ejemplo n.º 9
0
 public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
 {
     sprite.LoadContent(graphicsContentLoader);
 }
Ejemplo n.º 10
0
 public abstract void LoadContent(GraphicsContentLoader graphicsContentLoader);
Ejemplo n.º 11
0
 public abstract void LoadContent(ContentManager contentManager, GraphicsContentLoader graphicsContentLoader);
Ejemplo n.º 12
0
        public override void LoadContent(GraphicsContentLoader graphicsContentLoader)
        {
            texture = graphicsContentLoader.Get(textureLocation);

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