本文整理汇总了C#中SceneManager.AddObjectToScene方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.AddObjectToScene方法的具体用法?C# SceneManager.AddObjectToScene怎么用?C# SceneManager.AddObjectToScene使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.AddObjectToScene方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Load
public void Load()
{
Size clSize = Program.Window.ClientSize;
camera = new ChaseCamera(clSize.Width / (float)clSize.Height);
camera.ChaseDirection = new Vector3(0, 0, 1);
camera.ChasePosition = new Vector3(0, 0, 0);
camera.DesiredPositionOffset = new Vector3(0, 0, 40);
camera.Mode = RenderMode.Final;
camera.FarPlane = 1000;
camera.NearPlane = 0.5f;
camera.RenderTarget = renderSys.GetRenderTarget(0);
distance = 40;
yang = MathEx.Degree2Radian(30);
xang = MathEx.Degree2Radian(45);
sceneManager = new SceneManager();
SceneRendererParameter sm = new SceneRendererParameter ();
sm.PostRenderer = new DefaultPostRenderer();
sm.SceneManager = sceneManager;
sm.UseShadow = false;
renderer = new SceneRenderer(renderSys, sm);
renderer.RegisterCamera(camera);
peff = new SmokeEffect(renderSys);
peff.Emitter = new ParticleEmitter(1);
peff.Modifier = new ParticleModifier();
sceneManager.AddObjectToScene(peff);
}