本文整理汇总了C#中Loader.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# Loader.GetEnumerator方法的具体用法?C# Loader.GetEnumerator怎么用?C# Loader.GetEnumerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loader
的用法示例。
在下文中一共展示了Loader.GetEnumerator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadingScreen
public LoadingScreen(ContentManager content, GraphicsDevice gd)
{
loader = new Loader(content);
sb = new SpriteBatch(gd);
enumerator = loader.GetEnumerator();
loadingScreenFont = content.Load<SpriteFont>("LoadingScreen");
barTex = new Texture2D(gd, 1, 1);
uint[] texData = { 0xffffffff };
barTex.SetData<uint>(texData);
}
示例2: LoadingScreen
public LoadingScreen(ContentManager content, GraphicsDevice gd)
{
loader = new Loader(content, RenderingDevice.GDM);
sb = new SpriteBatch(gd);
enumerator = loader.GetEnumerator();
// This texture will be drawn behind the loading bar, centred on screen.
// The rest of the screen will be filled with the top left pixel color.
//screenBackgroundColor = topLeftPixelColor(backgroundTex);
// 1-pixel white texture for solid bars
barTex = new Texture2D(gd, 1, 1);
uint[] texData = { 0xffffffff };
barTex.SetData<uint>(texData);
screenRect = new Rectangle(0, 0, sb.GraphicsDevice.Viewport.Width, sb.GraphicsDevice.Viewport.Height);
loadingBarPos = new Rectangle();
loadingBarPos.Width = 200; // pixels
loadingBarPos.Height = 10;
loadingBarPos.X = RenderingDevice.GraphicsDevice.Viewport.TitleSafeArea.Width - loadingBarPos.Width - 30;
loadingBarPos.Y = (int)RenderingDevice.Height - RenderingDevice.GraphicsDevice.Viewport.TitleSafeArea.Height + 30;
}