public override void Initialize() { this.graphicsDevice = this.game.GraphicsDevice; this.titleTextures = new Texture2D[4]; this.titleTextures[0] = new Texture2D(this.graphicsDevice, singleSquareTextureSize, singleSquareTextureSize * 6); this.titleTextures[1] = new Texture2D(this.graphicsDevice, singleSquareTextureSize * 3, singleSquareTextureSize); this.titleTextures[2] = new Texture2D(this.graphicsDevice, singleSquareTextureSize * 3, singleSquareTextureSize); this.titleTextures[3] = new Texture2D(this.graphicsDevice, singleSquareTextureSize, singleSquareTextureSize * 2); var colorDataFactory = new ColorDataFactory(); this.titleTextures[0].SetData <Color>(colorDataFactory.Get(singleSquareTextureSize * singleSquareTextureSize * 6, Color.Yellow)); this.titleTextures[1].SetData <Color>(colorDataFactory.Get(singleSquareTextureSize * 3 * singleSquareTextureSize, Color.Yellow)); this.titleTextures[2].SetData <Color>(colorDataFactory.Get(singleSquareTextureSize * 3 * singleSquareTextureSize, Color.Yellow)); this.titleTextures[3].SetData <Color>(colorDataFactory.Get(singleSquareTextureSize * singleSquareTextureSize * 2, Color.Yellow)); }
public override void Initialize(GraphicsDevice graphicsDevice, ColorDataFactory colorDataFactory) { this.Texture = new Texture2D(graphicsDevice, TextureSize, TextureSize); this.Texture.SetData <Color>(colorDataFactory.Get(TextureSize * TextureSize, Color.Red)); }
public override void Initialize(GraphicsDevice graphicsDevice, ColorDataFactory colorDataFactory) { this.Texture = new Texture2D(graphicsDevice, this.Width, this.Heigth); this.Texture.SetData <Color>(colorDataFactory.Get(this.Width * this.Heigth, Color.White)); }