本文整理汇总了C#中SceneManager.AddEmptySceneNode方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.AddEmptySceneNode方法的具体用法?C# SceneManager.AddEmptySceneNode怎么用?C# SceneManager.AddEmptySceneNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.AddEmptySceneNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createScreen
//.........这里部分代码省略.........
anode2.GetMaterial(0).NormalizeNormals = true;
anode2.GetMaterial(0).Lighting = false;
anode2.SetTransitionTime(3);
Scenes.changeYodanAnimation(anode2, "idle");
//SkyBox
SceneNode skybox = smgr.AddSkyBoxSceneNode("./Contents/2D/Skybox/mountains_up.jpg", "./Contents/2D/Skybox/mountains_dn.jpg", "./Contents/2D/Skybox/mountains_lf.jpg", "./Contents/2D/Skybox/mountains_rt.jpg", "./Contents/2D/Skybox/mountains_ft.jpg", "./Contents/2D/Skybox/mountains_bk.jpg");
skybox.Visible = true;
//FPS kamera hozzáadása
camera = smgr.AddCameraSceneNodeFPS();
camera.Position = new Vector3Df(-1625.723f, -145.9937f, -1532.087f);
camera.Target = new Vector3Df(-1491.555f, -1434.106f, -1368.737f);
//fegyver
AnimatedMesh weaponmesh = smgr.GetMesh("./Content/3D/blades.mdl");
AnimatedMeshSceneNode weapon = smgr.AddAnimatedMeshSceneNode(weaponmesh, camera, 30);
weapon.Scale = new Vector3Df(0.5f, 0.5f, 0.5f);
weapon.Position = new Vector3Df(0, 0, 15);
weapon.Rotation = new Vector3Df(0, -90, 0);
Scenes.changeAnimation(weapon, 1, 1);
weapon.Visible = true;
//fizika
TriangleSelector selector;
selector = smgr.CreateOctreeTriangleSelector(q3levelmesh.GetMesh(0), q3node, 128);
q3node.TriangleSelector = selector;
anim = smgr.CreateCollisionResponseAnimator(selector, camera, new Vector3Df(30, 50, 30), new Vector3Df(0, -10, 0), new Vector3Df(0, 30, 0));
//Overlay
GUIImage overlay = device.GUIEnvironment.AddImage(driver.GetTexture("./Content/2D/Overlays/vignette.png"), new Vector2Di(0, 0));
overlay.ScaleImage = true;
overlay.SetMaxSize(new Dimension2Di(sizex, sizey));
overlay.SetMinSize(new Dimension2Di(sizex, sizey));
selector.Drop();
camera.AddAnimator(anim);
anim.Drop();
// fény
lightMovementHelperNode = smgr.AddEmptySceneNode();
q3node = smgr.AddSphereSceneNode(2, 6, lightMovementHelperNode, -1, new Vector3Df(15, -10, 15));
q3node.SetMaterialFlag(MaterialFlag.Lighting, false);
lightNode = q3node;
//A Portré
anode = smgr.AddAnimatedMeshSceneNode(smgr.GetMesh("./Content/3D/portrait.mdl"));
anode.Position = new Vector3Df(-1177.601f, -137.975f, -1238.015f);
anode.Rotation = new Vector3Df(0,0,0);
anode.Scale = new Vector3Df(3);
anode.AnimationSpeed = 1500;
anode.SetMaterialFlag(MaterialFlag.Lighting, true);
anode.GetMaterial(0).NormalizeNormals = true;
anode.GetMaterial(0).Lighting = false;
AnimatedMeshSceneNode anode4 = smgr.AddAnimatedMeshSceneNode(smgr.GetMesh("./Content/3D/waiter.mdl"));
anode4.Position = new Vector3Df(-1130, -375, -1724);
anode4.Rotation = new Vector3Df(0, -90, 0);
anode4.Scale = new Vector3Df(2, 2, 2);
anode4.SetMaterialFlag(MaterialFlag.Lighting, false);
Scenes.changeAnimation(anode4, 0, 1);
//Egér elrejtése
device.CursorControl.Visible = false;
GUIFont font = device.GUIEnvironment.BuiltInFont;
SceneCollisionManager collMan = smgr.SceneCollisionManager;
TextSceneNode headcrabName = smgr.AddTextSceneNode(font, "Yodan Lebegö Headcrab-je <Level 10>", new Color(255, 255, 0), null, anode3.Position + new Vector3Df(0, 25, 0), 0);
TextSceneNode waiterName = smgr.AddTextSceneNode(font, "John <Level 15>", new Color(0, 255, 0), null, anode4.Position + new Vector3Df(0, 125, 0), 0);
uint then = device.Timer.Time;
float MOVEMENT_SPEED = 100.0f;