public override void Initialize() { background = spriteSheet.GetSubSprite(new Rectangle(0, 0, 1024, 768)); ship = spriteSheet.GetSubSprite(new Rectangle(0, 771, 212, 185)); upperLeftRectangle = new Rectangle(0, 0, (int)Game1.ScreenSize.X / 2, (int)Game1.ScreenSize.Y / 2); lowerLeftRectangle = new Rectangle(0, upperLeftRectangle.Height, upperLeftRectangle.Width, upperLeftRectangle.Height); rightRectangle = new Rectangle(lowerLeftRectangle.Width, 0, lowerLeftRectangle.Width, (int)(Game1.ScreenSize.Y)); //Managers for cursor and text. cursorManager = new ShipManagerCursor(Game, spriteSheet); cursorManager.Initialize(); fontManager = new ShipManagerText(Game); fontManager.Initialize(); informationManager = new InventoryInformation(Game); informationManager.Initialize(); //Data about current active user position. cursorLevel = 1; //cursorLevel1Position = 0; cursorCoordLv1 = new CursorCoordinate(0, 0, 5, 2, true); cursorLevel2Position = 0; //column = 1; elapsedSinceKey = 0; elapseDelay = 50; itemComp = new ItemComparison(this.Game, this.spriteSheet, new Rectangle(504, 772, 9, 5), new Rectangle(504, 787, 9, 8), new Rectangle(504, 778, 9, 8)); }
public void Update(GameTime gameTime, int layer, CursorCoordinate cursorCoordLv1, int cursorLv2Pos) { this.layer = layer; this.cursorCoordLv1 = cursorCoordLv1; this.cursorLv2Pos = cursorLv2Pos; foreach (ShipInventoryDisplayObject menuDisplay in displayList) { menuDisplay.UpdateActivity(cursorCoordLv1); } }