public Stringscape(string word, Texture2D baseCircleTexture, Texture2D letterTexture, Texture2D leftRightArrowTexture, Texture2D upDownArrowTexture, GraphicsDevice GraphicsDevice, SpriteFont letterFont, SpriteFont wordListFont, SpriteFont definitionFont) { word = word.ToUpper(); baseWord = word; newShufflePositions = new Vector2[baseWord.Length]; this.letterFont = letterFont; this.definitionFont = definitionFont; baseCircle = new BaseCircle(baseCircleTexture, new Vector2(0, GraphicsDevice.Viewport.Height - baseCircleTexture.Height), new Color(Color.LightSteelBlue, 235), GraphicsDevice, letterTexture.Width / 2, word.Length); letters = new List <Letter>(); this.letterTexture = letterTexture; this.GraphicsDevice = GraphicsDevice; Texture2D backdropPixel = new Texture2D(GraphicsDevice, 1, 1); backdropPixel.SetData(new[] { Color.White }); backdrop = new Sprite(backdropPixel, Vector2.Zero, Color.CornflowerBlue, GraphicsDevice) { Scale = new Vector2(baseCircleTexture.Width, GraphicsDevice.Viewport.Height) }; for (int i = 0; i < word.Length; i++) { letters.Add(new Letter(letterTexture, baseCircle.innerPoints[i] - new Vector2(letterTexture.Width / 2, letterTexture.Height / 2), Color.TransparentBlack, word[i], letterFont, GraphicsDevice, Color.OrangeRed)); } Reshuffle(); currentWord = ""; orderOfLetters = new List <int>(); this.wordListFont = wordListFont; wordManager = new WordManager(leftRightArrowTexture, upDownArrowTexture, GraphicsDevice, wordListFont, definitionFont); }
public BaseGameObject(string word, Texture2D baseCircleTexture, Texture2D letterTexture, GraphicsDevice GraphicsDevice, SpriteFont letterFont, SpriteFont wordListFont) { word = word.ToUpper(); baseWord = word; this.letterFont = letterFont; this.wordListFont = wordListFont; baseCircle = new BaseCircle(baseCircleTexture, new Vector2(0, GraphicsDevice.Viewport.Height - baseCircleTexture.Height), new Color(Color.LightSteelBlue, 235), GraphicsDevice, letterTexture.Width / 2, word.Length); letters = new List <Letter>(); this.letterTexture = letterTexture; this.GraphicsDevice = GraphicsDevice; for (int i = 0; i < word.Length; i++) { letters.Add(new Letter(letterTexture, baseCircle.innerPoints[i] - new Vector2(letterTexture.Width / 2, letterTexture.Height / 2), Color.TransparentBlack, word[i], letterFont, GraphicsDevice, Color.OrangeRed)); } Reshuffle(); currentWord = ""; orderOfLetters = new List <int>(); }