//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); }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { collisionTexture = graphicsContentLoader.Get("collision"); rangeTexture = graphicsContentLoader.Get("range"); base.LoadContent(graphicsContentLoader); }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { textureOn = graphicsContentLoader.Get("switchOn"); textureOff = graphicsContentLoader.Get("switchOff"); isInitialized = true; }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { texture = graphicsContentLoader.Get(textureLocation); foreach (MenuButton button in menuButtons) { button.texture = graphicsContentLoader.Get(button.textureLocation); } isInitialized = true; }
/// <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); }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { texture = graphicsContentLoader.Get("Characters"); isInitialized = true; }
public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager contentManager, GraphicsContentLoader graphicsContentLoader) { this.graphicsContentLoader = graphicsContentLoader; //TheGame.Instance.player1.LoadContent(graphicsContentLoader); }
public void LoadContent(GraphicsContentLoader graphicsContentLoader) { texture = graphicsContentLoader.Get("cursor"); }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { sprite.LoadContent(graphicsContentLoader); }
public abstract void LoadContent(GraphicsContentLoader graphicsContentLoader);
public abstract void LoadContent(ContentManager contentManager, GraphicsContentLoader graphicsContentLoader);
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { texture = graphicsContentLoader.Get(textureLocation); isInitialized = true; }
public override void LoadContent(GraphicsContentLoader graphicsContentLoader) { texture = graphicsContentLoader.Get("bullet"); isActive = true; isInitialized = true; }