WindowsGame1.Sprite.LoadContent C# (CSharp) Method

LoadContent() public method

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void
theContentManager Microsoft.Xna.Framework.Content.ContentManager
theAssetName string
return void
        public void LoadContent(ContentManager theContentManager, string theAssetName)
        {
            tex = theContentManager.Load<Texture2D>(theAssetName);
            assetName = theAssetName;
            sourceRect = new Rectangle(0, 0, (int)(tex.Width * Scale), (int)(tex.Height * Scale));
        }

Usage Example

Ejemplo n.º 1
0
 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.");
 }
All Usage Examples Of WindowsGame1.Sprite::LoadContent