public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void | ||
theContentManager | Microsoft.Xna.Framework.Content.ContentManager | |
theAssetName | string | |
return | void |
public void LoadContentTest() { Sprite target = new Sprite(); // TODO: Initialize to an appropriate value ContentManager theContentManager = null; // TODO: Initialize to an appropriate value string theAssetName = string.Empty; // TODO: Initialize to an appropriate value target.LoadContent(theContentManager, theAssetName); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
/// <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); // TODO: use this.Content to load your game content here mBackground.LoadContent(this.Content, "Background"); mBackground.Scale = 2.0f; mPlayer.LoadContent(this.Content); mPlayer.Scale = 0.8f; }
public void LoadContent(ContentManager myContentManager, SpriteFont font) { image = myContentManager.Load<Texture2D>("figur"); talkingimage = myContentManager.Load<Texture2D>("figurtalking"); imageascii = new Sprite(); imageascii.LoadContent(myContentManager, "at"); animimage = new AnimatedSprite("hero", "figur", image, 4, 9); talkimage = new AnimatedSprite("herotalking", "figurtalking", talkingimage, 4, 5); playerRect.Width = (animimage.Texture.Width / animimage.Columns) / 2; playerRect.Height = (animimage.Texture.Height / animimage.Rows) / 5; verbmenu.LoadContent(myContentManager, font); }
public void LoadContentTest_Spr() { Game1 game = new Game1(); Sprite target = new Sprite(); ContentManager theContentManager = game.Content; string theAssetName = "test"; target.LoadContent(theContentManager, theAssetName); Assert.IsNotNull(target.getTex()); }
/// <summary> /// Add an image to the imagelist of the object. /// </summary> /// <param name="myContentManager">XNA Contentmanager</param> /// <param name="spritename">Name of the image file in the XNA Contentpipeline</param> public void AddSprite(ContentManager myContentManager, String spritename) { Sprite NewSprite = new Sprite(); NewSprite.LoadContent(myContentManager, spritename); images.Add(NewSprite); imagenames.Add(spritename); }