Exemplo n.º 1
0
 public DisplayTarget(EngineReference engineRef, GameWindow window, GraphicsDeviceManager graphics)
 {
     this.engineRef       = engineRef;
     this.graphics        = graphics;
     this.spriteBatch     = new SpriteBatch(graphics.GraphicsDevice);
     this.ViewportAdapter = new ViewportAdapter(window, graphics.GraphicsDevice, 256, 240);
 }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            SfxrSynth.AudioPlayerFactory = new Audio.AudioPlayerFactory();

            base.Initialize();

            engineRef      = new EngineReference();
            displayTarget  = new DisplayTarget(engineRef, Window, graphics);
            textureFactory = new TextureFactory(this.GraphicsDevice);
            spriteBatch    = new SpriteBatch(GraphicsDevice);
            inputFactory   = new InputFactory(displayTarget);

            runner = new RunnerWrapper("./Content/MusicDemo.pv8", engineRef, displayTarget, textureFactory, inputFactory);

            runner.Initialize();

            // forces viewport adapter to refresh position/scaling
            graphics.PreferredBackBufferWidth  = graphics.PreferredBackBufferWidth;
            graphics.PreferredBackBufferHeight = graphics.PreferredBackBufferHeight;
            graphics.ApplyChanges();
        }
Exemplo n.º 3
0
 public ShaderReference(EngineReference reference)
     : this(ReferenceType.Entity, reference)
 {
 }