Example #1
0
        protected override void LoadContent()
        {
            graphics.PreferredBackBufferHeight = Bounds.Height;
            graphics.PreferredBackBufferWidth  = Bounds.Width;
            graphics.ApplyChanges();
            User32.SetWindowPos((uint)this.Window.Handle, 0, Bounds.X, Bounds.Y, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight, 0);

            spriteBatch = new SpriteBatch(GraphicsDevice);

            PanInEffect  = Content.Load <Effect>("PanIn");
            PanOutEffect = Content.Load <Effect>("PanOut");

            FadeInEffect  = Content.Load <Effect>("FadeIn");
            FadeOutEffect = Content.Load <Effect>("FadeOut");

            SpiralInEffect  = Content.Load <Effect>("SpiralIn");
            SpiralOutEffect = Content.Load <Effect>("SpiralOut");

            if (IsLeft)
            {
                Images.Add(Content.Load <Texture2D>("Alex1"));
                Images.Add(Content.Load <Texture2D>("F22"));
                Images.Add(Content.Load <Texture2D>("Tim1"));
                Images.Add(Content.Load <Texture2D>("CPU1"));
            }

            else
            {
                Images.Add(Content.Load <Texture2D>("Megaman1"));
                Images.Add(Content.Load <Texture2D>("Megaman2"));
                Images.Add(Content.Load <Texture2D>("Megaman3"));
                Images.Add(Content.Load <Texture2D>("Megaman4"));
                Images.Add(Content.Load <Texture2D>("Megaman5"));
            }

            Mode = RandomMode();
            GeneratePrimatives(Program.Rand.Next(10, 25), Images[0]);

            FixedCamera = new TargetCamera(new Vector3(100, 50, 300), new Vector3(100, 50, 0), GraphicsDevice);
            FixedCamera.Update();

            MovableCamera = new FreeCamera(new Vector3(250, 225, 750), 0, 0, GraphicsDevice);
            MovableCamera.Update();
        }
Example #2
0
        protected override void LoadContent()
        {
            graphics.PreferredBackBufferHeight = Bounds.Height;
            graphics.PreferredBackBufferWidth = Bounds.Width;
            graphics.ApplyChanges();
            User32.SetWindowPos((uint)this.Window.Handle, 0, Bounds.X, Bounds.Y, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight, 0);

            spriteBatch = new SpriteBatch(GraphicsDevice);

            PanInEffect = Content.Load<Effect>("PanIn");
            PanOutEffect = Content.Load<Effect>("PanOut");

            FadeInEffect = Content.Load<Effect>("FadeIn");
            FadeOutEffect = Content.Load<Effect>("FadeOut");

            SpiralInEffect = Content.Load<Effect>("SpiralIn");
            SpiralOutEffect = Content.Load<Effect>("SpiralOut");

            if (IsLeft)
            {

                Images.Add(Content.Load<Texture2D>("Alex1"));
                Images.Add(Content.Load<Texture2D>("F22"));
                Images.Add(Content.Load<Texture2D>("Tim1"));
                Images.Add(Content.Load<Texture2D>("CPU1"));

            }

            else
            {

                Images.Add(Content.Load<Texture2D>("Megaman1"));
                Images.Add(Content.Load<Texture2D>("Megaman2"));
                Images.Add(Content.Load<Texture2D>("Megaman3"));
                Images.Add(Content.Load<Texture2D>("Megaman4"));
                Images.Add(Content.Load<Texture2D>("Megaman5"));

            }

            Mode = RandomMode();
            GeneratePrimatives(Program.Rand.Next(10, 25), Images[0]);

            FixedCamera = new TargetCamera(new Vector3(100, 50, 300), new Vector3(100, 50, 0), GraphicsDevice);
            FixedCamera.Update();

            MovableCamera = new FreeCamera(new Vector3(250, 225, 750), 0, 0, GraphicsDevice);
            MovableCamera.Update();
        }