Inheritance: Microsoft.Xna.Framework.GameComponent, IViewStatus
Exemplo n.º 1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            InitializeEffect();
            myModel = Content.Load<Model>("Models/stairs1");
            myModel1 = Content.Load<Model>("Models/stairs");
            texture = Content.Load<Texture2D>("Textures/wall");
            aspectRatio = (float)graphics.GraphicsDevice.Viewport.Width /
            (float)graphics.GraphicsDevice.Viewport.Height;

            ResourceProvider.Instance.Initialize(GraphicsDevice, Content);
            c = new CubeGraphic { Texture = texture, DrawFaces = CubeFaces.Back, Position = Vector3.Zero, Scale = new Vector3(1) };

            f = new FreeLookCamera(this);
            f.Position = new Vector3(0, 0, 5);
            f.ForwardDirection = -Vector3.UnitZ;
            Components.Add(f);
        }