本文整理汇总了C#中ContentManager.AddDefaultContentLoader方法的典型用法代码示例。如果您正苦于以下问题:C# ContentManager.AddDefaultContentLoader方法的具体用法?C# ContentManager.AddDefaultContentLoader怎么用?C# ContentManager.AddDefaultContentLoader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentManager
的用法示例。
在下文中一共展示了ContentManager.AddDefaultContentLoader方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Intro
public override void Intro( params object [] args )
{
LiqueurSystem.Window.Title = "Simple Dodge";
LiqueurSystem.GraphicsDevice.BlendState = true;
LiqueurSystem.GraphicsDevice.BlendOperation = BlendOperation.AlphaBlend;
Add ( InputHelper.CreateInstance () );
InputHelper.IsKeyboardEnabled = true;
Add ( SceneContainer = new SceneContainer ( new MenuScene () ) );
contentManager = new ContentManager ( FileSystemManager.GetFileSystem ( "ManifestFileSystem" ) );
contentManager.AddDefaultContentLoader ();
LiqueurSystem.Launcher.InvokeInMainThread ( () =>
{
fpsFont = contentManager.Load<TrueTypeFont> ( "Test.Game.Dodge.Resources.GameFont.ttf", 20 );
} );
FpsCalculator calc;
Add ( calc = new FpsCalculator () );
calc.DrawEvent += ( object sender, GameTimeEventArgs e ) =>
{
string fpsString = string.Format ( "Update FPS:{0:0.00}\nRender FPS:{1:0.00}", calc.UpdateFPS, calc.DrawFPS );
fpsFont.DrawFont ( fpsString, Color.White,
LiqueurSystem.GraphicsDevice.ScreenSize - fpsFont.MeasureString ( fpsString ) - new Vector2 ( 10, 10 ) );
};
base.Intro ( args );
}
示例2: Intro
public override void Intro( params object [] args )
{
contentManager = new ContentManager ( FileSystemManager.GetFileSystem ( "ManifestFileSystem" ) );
contentManager.AddDefaultContentLoader ();
LiqueurSystem.Launcher.InvokeInMainThread ( () =>
{
titleFont = contentManager.Load<TrueTypeFont> ( "Test.Game.Dodge.Resources.GameFont.ttf", 64 );
menuFont = contentManager.Load<TrueTypeFont> ( "Test.Game.Dodge.Resources.GameFont.ttf", 24 );
} );
base.Intro ( args );
}