public TestSpriteClassState(TextureManager textureManager) { _textureManager = textureManager; _testSprite.Texture = _textureManager.Get("face_alpha"); _testSprite.SetHeight(256 * 0.5f); _testSprite2.Texture = textureManager.Get("face_alpha"); _testSprite2.SetPosition(-256, -256); _testSprite2.SetColor(new Color(1, 1, 0, 1)); }
public static void Initialize(int viewportWidth, int viewportHeight, bool fullscreen) { Game.Graphics = new GraphicsDevice(); Game.Scenes = new SceneManager(); Game.Textures = new TextureManager(); Game.Inputs = new InputManager(); Game.IsInitialized = Graphics.Initialize(viewportWidth, viewportHeight, fullscreen); if(!Game.IsInitialized) { throw new InvalidOperationException("Error initializing viewport"); } }