本文整理汇总了C#中RenderManager.addText方法的典型用法代码示例。如果您正苦于以下问题:C# RenderManager.addText方法的具体用法?C# RenderManager.addText怎么用?C# RenderManager.addText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderManager
的用法示例。
在下文中一共展示了RenderManager.addText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: doInitialize
public override void doInitialize()
{
// get font
IResourceService resService = Owner.Game.Services.GetService(typeof(IResourceService)) as IResourceService;
m_font = resService.Fonts[m_fontName];
// add to rendermanager
m_renderManager = Owner.Game.Services.GetService(typeof(RenderManager)) as RenderManager;
m_renderManager.addText(this);
// get position
IPosition3D pos = Owner.getFirst(typeof(IPosition3D)) as IPosition3D;
if (pos != null)
{
m_position = pos.Position;
pos.PositionChanged += new XnaScrapCore.Core.Delegates.Position3DChangedEventHandler(PositionChanged);
}
// get dimension
IScale3D scale = Owner.getFirst(typeof(IScale3D)) as IScale3D;
if (scale != null)
{
m_scale = scale.Scale;
scale.Changed += new Scale3DChangedEventHandler(scale_Changed);
}
base.doInitialize();
}