本文整理汇总了C#中AssetManager.LoadContent方法的典型用法代码示例。如果您正苦于以下问题:C# AssetManager.LoadContent方法的具体用法?C# AssetManager.LoadContent怎么用?C# AssetManager.LoadContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetManager
的用法示例。
在下文中一共展示了AssetManager.LoadContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ContextManager
public ContextManager(ContentManager content, GraphicsDevice graphicsDevice, SpriteBatch spriteBatch)
{
assets = new AssetManager();
assets.LoadContent(content, graphicsDevice);
canvas = new Canvas(assets, graphicsDevice, spriteBatch);
input = new InputController(assets);
storage = new StorageManager();
LayoutTree layoutTree = LayoutEngine.BuildLayout(content.Load<Text>("master"));
Integrate(assets, layoutTree.Root);
assets.GetLevel("Level1");
}
示例2: Initialize
/// <summary>
/// Should be called in load content.
/// </summary>
public void Initialize(GameContext initialContext)
{
canvas = new Canvas(graphics, graphicsDevice);
#if DEBUG
canvas.DebugMode = true;
#else
canvas.DebugMode = false;
#endif
// Initialize audio player.
audioPlayer = new AudioPlayer();
assets = new AssetManager();
exitGame = false;
//launch initialize asynchronously
//ThreadPool.QueueUserWorkItem(new WaitCallback(InitializeNextContext));
asyncFinished = true;
/*Thread t = new Thread(new ThreadStart(InitializeNextContext));
t.IsBackground = true;
t.Start();*/
// load all content
assets.LoadContent(content, graphicsDevice);
canvas.LoadContent(assets);
inputController = new InputController(assets);
fileManager = new DataCenter(assets);
InitializeContextComponents(initialContext);
currentContext = initialContext;
inputController.Update();
currentOverlayAlpha = 0;
}