public MayorMenu(Game game) : base(game) { this.resourcesHUD = game.Components.OfType <ResourcesHUD>().ElementAt(0); this.populationOutlinePos = new Vector2(game.GraphicsDevice.Viewport.Width - 300, 40); game.RegisterGameComponent <AssignmentMayorMenu>(out this.assignmentMenu, false, false); this.assignmentMenu.OnRemoveRequestSent += new AssignmentMayorMenu.RemoveRequestSent(assignmentMenu_OnRemoveRequestSent); this.assignmentMenu.OnAddRequestSent += new AssignmentMayorMenu.AddRequestSent(assignmentMenu_OnAddRequestSent); game.RegisterGameComponent <TrainingMayorMenu>(out this.trainingMenu, false, false); this.trainingMenu.OnAddRequestSent += new TrainingMayorMenu.AddRequestSent(trainingMenu_OnAddRequestSent); this.inputManager = game.GetService <InputManager>(); this.isCityhallBuilt = false; this.listOfRecallAddWorkersEvents = AssignmentHelper.GetListOfEvents(); this.listOfAddSoldiersEvents = TrainingMenuHelper.GetListOfEvents(); }
public CityhallMenu(Game game) : base(game) { this.hireBtnPos = new Point(game.GraphicsDevice.Viewport.Width - 10 - 64, 120); //Fill free to place this button where ever you want this.resourcesHUD = game.Components.OfType <ResourcesHUD>().ElementAt(0); }