예제 #1
0
파일: Game1.cs 프로젝트: isaaczinda/Cicada
        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();
        }
예제 #2
0
파일: Game1.cs 프로젝트: isaaczinda/Cicada
        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();
        }