本文整理汇总了C#中ICanvas.CreateFont方法的典型用法代码示例。如果您正苦于以下问题:C# ICanvas.CreateFont方法的具体用法?C# ICanvas.CreateFont怎么用?C# ICanvas.CreateFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICanvas
的用法示例。
在下文中一共展示了ICanvas.CreateFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeScene
public override void InitializeScene(ICanvas canvas)
{
// Connect with simulator
connection = new NetworkClient();
if (!connection.Connect("ganberg2", 9999))
{
throw new ApplicationException("Unable to establish connection with host.");
}
else
{
connection.Subscribe("TimeTick");
connection.Subscribe("ViewProUpdate");
}
// Create and initialize Gameboard.
background = new Obj_Sprite(texture_file, SpriteFlags.SortTexture | SpriteFlags.AlphaBlend);
background.Initialize(canvas);
background.Position = new Vector3(0, 0, 0);
background.Rotation = new Vector3(0, 0, 0);
background.Scaling = new Vector3(1, 1, 1);
background.Texture(canvas);
// Initialize and create Font;
this._myFont = canvas.CreateFont(new System.Drawing.Font("Arial", 10));
message = string.Empty;
//f16 = new Obj_Sprite("f16.png", SpriteFlags.AlphaBlend);
//f16.Initialize(canvas);
//f16.Texture(canvas);
//f16.Position = new Vector3(0, 0, 0);
//f16.Rotation = new Vector3(0, 0, 0);
//f16.Scaling = new Vector3(1, 1, 1);
}