A scene capable of rendering 3D elements.
Inheritance: _3DAbstract
示例#1
0
        private void initSimHead()
        {
            HeadCamera = new BasicCamera(GameFacade.GraphicsDevice, new Vector3(0.0f, 7.0f, -17.0f), Vector3.Zero, Vector3.Up);

            HeadCamera.Position = new Vector3(0, 5.2f, 12.5f);
            HeadCamera.Target = new Vector3(0, 5.2f, 0.0f);

            HeadScene = new _3DScene(GameFacade.Game.GraphicsDevice, HeadCamera);
            HeadScene.ID = "UIPieMenuHead";

            //HeadCamera.NearPlane = 5;
            //HeadCamera.FarPlane = 923840284;

            //GameFacade.Game.GraphicsDevice.DeviceReset += new EventHandler(GraphicsDevice_DeviceReset);

            m_Head.Scene = HeadScene;
            m_Head.Scale = new Vector3(1f);
            HeadScene.Add(m_Head);
            GameFacade.Scenes.AddExternal(HeadScene); //AddExternal(HeadScene);
        }
示例#2
0
文件: UISim.cs 项目: Daribon/FreeSO
        private void UISimInit()
        {
            Camera = new BasicCamera(GameFacade.GraphicsDevice, new Vector3(0.0f, 7.0f, -17.0f), Vector3.Zero, Vector3.Up);
            Scene = new _3DScene(GameFacade.Game.GraphicsDevice, Camera);
            Scene.ID = "UISim";

            GameFacade.Game.GraphicsDevice.DeviceReset += new EventHandler<EventArgs>(GraphicsDevice_DeviceReset);

            Avatar = new AdultVitaboyModel();
            Avatar.Scene = Scene;
            Avatar.Scale = new Vector3(0.45f);
            Scene.Add(Avatar);
        }
示例#3
0
        private void Vitaboy_Load(object sender, EventArgs e)
        {
            try
            {
                Content.Content.Init("F:\\Games\\Maxis\\The Sims Online\\TSOClient\\", canvas.GraphicsDevice);
            }
            catch (Exception)
            {
                return;
            }

            Content.Content content;
            content = Content.Content.Get();

            foreach (var binding in content.AvatarBindings.List()){
                bindingsList.Items.Add(binding);
            }

            foreach (var outfit in content.AvatarOutfits.List()){
                outfitList.Items.Add(outfit);
            }

            foreach (var animation in content.AvatarAnimations.List()){
                animationsList.Items.Add(animation);
            }

            _3D = new _3DLayer();
            Camera = new BasicCamera(canvas.GraphicsDevice, new Vector3(10.0f, 10.0f, 10.0f), new Vector3(5.0f, 5.0f, 5.0f), Vector3.Up);
            Scene = new _3DScene(canvas.GraphicsDevice, Camera);
            _3D.Add(Scene);
            canvas.Screen.Add(_3D);

            Animator = new Animator();
            Scene.Add(Animator);
        }