Exemplo n.º 1
0
        protected override void LoadContent()
        {
            BarkTexture      = Content.Load <Texture2D>("Bark Texture");
            CrossHairTexture = Content.Load <Texture2D>("Cross-hair");
            spriteBatch      = new SpriteBatch(GraphicsDevice);
            Font             = Content.Load <SpriteFont>("myFont");

            // Draws Bark Blocks
            Bark = new DrawTextruredBlock();
            BarkBlockLocations    = new Vector3[1];
            BarkBlockLocations[0] = new Vector3(0, 0, 0);
            Bark.Begin(BarkTexture, Content, GraphicsDevice, BarkBlockLocations);


            // MotionLogic
            Motion           = new MotionLogic();
            viewMatrix       = Matrix.CreateLookAt(new Vector3(0, 0, 0), new Vector3(0, 0, 50), new Vector3(0, 1, 0));
            projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, GraphicsDevice.Viewport.AspectRatio, 1.0f, 300.0f);

            Intersection = new IntersectionAlgorithm();
        }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            BarkTexture = Content.Load<Texture2D>("Bark Texture");
            CrossHairTexture = Content.Load<Texture2D>("Cross-hair");
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Font = Content.Load<SpriteFont>("myFont");

            // Draws Bark Blocks
            Bark = new DrawTextruredBlock();
            BarkBlockLocations = new Vector3[1];
            BarkBlockLocations[0] = new Vector3(0, 0, 0);
            Bark.Begin(BarkTexture, Content, GraphicsDevice, BarkBlockLocations);

            // MotionLogic
            Motion = new MotionLogic();
            viewMatrix = Matrix.CreateLookAt(new Vector3(0, 0, 0), new Vector3(0, 0, 50), new Vector3(0, 1, 0));
            projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, GraphicsDevice.Viewport.AspectRatio, 1.0f, 300.0f);

            Intersection = new IntersectionAlgorithm();
        }