本文整理汇总了C#中Axiom.Core.SceneManager.CreateMovableObject方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.CreateMovableObject方法的具体用法?C# SceneManager.CreateMovableObject怎么用?C# SceneManager.CreateMovableObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.SceneManager
的用法示例。
在下文中一共展示了SceneManager.CreateMovableObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupBody
/// <summary>
///
/// </summary>
/// <param name="sceneMgr"></param>
private void SetupBody( SceneManager sceneMgr )
{
// create main model
bodyNode = sceneMgr.RootSceneNode.CreateChildSceneNode( Vector3.UnitY * CharHeight );
bodyEnt = sceneMgr.CreateEntity( "SinbadBody", "Sinbad.mesh" );
bodyNode.AttachObject( bodyEnt );
// create swords and attach to sheath
sword1 = sceneMgr.CreateEntity( "SinbadSword1", "Sword.mesh" );
sword2 = sceneMgr.CreateEntity( "SinbadSword2", "Sword.mesh" );
bodyEnt.AttachObjectToBone( "Sheath.L", sword1 );
bodyEnt.AttachObjectToBone( "Sheath.R", sword2 );
// create a couple of ribbon trails for the swords, just for fun
NamedParameterList paras = new NamedParameterList();
paras[ "numberOfChains" ] = "2";
paras[ "maxElements" ] = "80";
swordTrail = (RibbonTrail)sceneMgr.CreateMovableObject( "SinbadRibbon", "RibbonTrail", paras );
swordTrail.MaterialName = "Examples/LightRibbonTrail";
swordTrail.TrailLength = 20;
swordTrail.IsVisible = false;
sceneMgr.RootSceneNode.AttachObject( swordTrail );
for ( int i = 0; i < 2; i++ )
{
swordTrail.SetInitialColor( i, new ColorEx( 1, 0.8f, 0 ) );
swordTrail.SetColorChange( i, new ColorEx( 0.75f, 0.25f, 0.25f, 0.25f ) );
swordTrail.SetWidthChange( i, 1 );
swordTrail.SetInitialWidth( i, 0.5f );
}
keyDirection = Vector3.Zero;
verticalVelocity = 0;
}