public RollButton(GraphicsDeviceManager graphics, Texture2D texture) { this.graphics = graphics; this.texture = texture; var posx = graphics.PreferredBackBufferWidth - texture.Width - 150; var posy = Statics.GetCenter(texture, graphics).Y - 250; pos = new Vector2((float)posx, (float)posy); }
public SideTracker(ContentManager content, GraphicsDeviceManager graphics, int character, List <Character> list) { this.character = character; currentTexture = 0; this.content = content; this.graphics = graphics; textureList.Add(content.Load <Texture2D>("personbanner0_0.png")); textureList.Add(content.Load <Texture2D>("personbanner1_0.png")); textureList.Add(content.Load <Texture2D>("personbanner2_0.png")); textureList.Add(content.Load <Texture2D>("personbanner0_1.png")); this.texture = textureList[currentTexture]; double posx = graphics.PreferredBackBufferWidth - texture.Width - 100; double posy = Statics.GetCenter(texture, graphics).Y - 150 + ((texture.Height - 1) * character); position = new Vector2((float)posx, (float)posy); }