public void Initialize(string screenName) { this.menuSystem = new MenuSystem(Stage.LoadingStage.GetQB<ControlsQB>()); this.menuSystem.Initialize(); if (!string.IsNullOrEmpty(screenName)) { this.firstScreenName = screenName; this.firstScreen = GetGameScreenByName(screenName); menuSystem.AddScreen(firstScreen); } }
public HudScreen(MenuSystem menuSystem) { this.MenuSystem = menuSystem; //set up constants this.boarderSize = 1; this.backgroundSize = 2; this.x = Stage.WindowSize.Left+10; this.y = Stage.WindowSize.Top+10; this.height = 5; this.width = 100; //Set up Boarder, Background and Health bar in relation to each other. healthBoarder = new Rectangle(x, y, (int)width + (boarderSize + backgroundSize), height+(boarderSize + backgroundSize)); healthBackground = new Rectangle(x + boarderSize, y + boarderSize, (int)width + boarderSize, height + boarderSize); healthBar = new Rectangle(x + boarderSize, y + boarderSize, (int)width, height); }