Esempio n. 1
0
        public DrawWrapper(SpriteBatch batch, GraphicsDevice device, AssetManager assetsManager)
        {
            GlobalScale = 1f;

            spriteBatch = batch;
            graphicsDevice = device;
            deviceWidth = graphicsDevice.Viewport.Width;

            Assets = assetsManager;

            basicEffect = new BasicEffect(device)
            {
                VertexColorEnabled = true,
                World = Matrix.Identity,
                View = Matrix.Identity,
            };

            guiEffect = (BasicEffect) basicEffect.Clone();

            SetProjectionMatrix(standardWidth, standardHeight);
            ScreenSize = new Vector2(graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height);

            displayWidth = standardWidth;
            displayHeight = standardHeight;
        }
Esempio n. 2
0
        public MainGame()
        {
            Graphics = new GraphicsDeviceManager(this);
            assetManager = new AssetManager(Content);

            Profiler = new Profiler();

            Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
        }
Esempio n. 3
0
 public AudioWrapper(AssetManager assetsManager)
 {
     Assets = assetsManager;
 }