本文整理汇总了C#中SceneManager.AddSkyBoxSceneNode方法的典型用法代码示例。如果您正苦于以下问题:C# SceneManager.AddSkyBoxSceneNode方法的具体用法?C# SceneManager.AddSkyBoxSceneNode怎么用?C# SceneManager.AddSkyBoxSceneNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SceneManager
的用法示例。
在下文中一共展示了SceneManager.AddSkyBoxSceneNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createScreen
//.........这里部分代码省略.........
SceneNode node = null;
if (mapName == "rpg")
{
IsRPG = true;
}
//LightSceneNode light = smgr.AddLightSceneNode(q3node, new Vector3Df(-1319, -118, -1410), new Color(255, 255, 255), 600.0, 10);
//Half-Life Headcrab
AnimatedMeshSceneNode anode3 = smgr.AddAnimatedMeshSceneNode(smgr.GetMesh("./Content/3D/headcrab.mdl"));
if (IsRPG)
{
anode3.Position = new Vector3Df(-1212, -180, -1346);
Audio.playWave("./Content/Music/rpg.mp3");
}
else
{
anode3.Position = new Vector3Df(-1372.951f, -145.9882f, -1319.71f);
}
anode3.Rotation = new Vector3Df(0, 0, 0);
anode3.AnimationSpeed = 1;
Scenes.changeAnimation(anode3, 1, 31);
anode3.SetMaterialFlag(MaterialFlag.Lighting, true);
anode3.GetMaterial(0).NormalizeNormals = true;
anode3.GetMaterial(0).Lighting = false;
//Yodan
anode2 = smgr.AddAnimatedMeshSceneNode(smgr.GetMesh("./Content/3D/yodan.mdl"));
anode2.Position = new Vector3Df(-1355, -200, -1410);
anode2.AnimationSpeed = 15;
anode2.SetMaterialFlag(MaterialFlag.Lighting, true);
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);