예제 #1
0
        /// <summary>
        ///  This is the Initializer to run on every (re)start of the manager
        /// </summary>
        public void Initialize()
        {
            // Create the SceneNode under which we will add our Scene elements
            parent = Reference.SceneManager.AddEmptySceneNode(Reference.SceneManager.RootSceneNode, -1);

            // Add elements under parent
            healthBar = Reference.SceneManager.AddBillboardSceneNode(parent, new Dimension2Df(0.5f, 0.1f), -1);
            healthBar.SetMaterialTexture(0, healthBarG);
            healthBar.SetMaterialType(MaterialType.TransparentAlphaChannel);
            healthBar.SetMaterialFlag(MaterialFlag.Lighting, false);

            healthText = Reference.SceneManager.AddBillboardTextSceneNodeW(Reference.GUIEnvironment.BuiltInFont, "(x_x)",
                                                                           parent, new Dimension2Df(0.7f, 0.2f),
                                                                           new Vector3D(), -1, Color.White,
                                                                           Color.White);
            // We will only display this text when the avatar is dead
            healthText.Visible = false;
        }
예제 #2
0
        public void CreateSkyPalette()
        {
            smgr.AddSkyBoxSceneNode(this, stars, -1);

            sky = new ATMOSkySceneNode(dangus, smgr.RootSceneNode, smgr, 80, skyid);
            sky.Material.MaterialType = MaterialType.TransparentAlphaChannel;
            sky.Material.MaterialTypeParam = 0.01f;

            sun = smgr.AddBillboardSceneNode(this, new Dimension2Df(150, 150), -1);
            sun.GetMaterial(0).Lighting = false;
            sun.GetMaterial(0).Texture1 = suntex;
            sun.GetMaterial(0).MaterialTypeParam = 0.01f;
            sun.GetMaterial(0).MaterialType = MaterialType.TransparentAlphaChannel;
        }