public BS_Game(ViewManager viewManager) : base(viewManager) { _sideBar = new BS_SideBar(_viewManager); _servingArea = new BS_ServingArea(); _btmBar = new BS_BottomBar(); _giveUpButton = new BS_Button("blue_button07.png"); _giveUpButton.SetWidth(80); _giveUpButton.SetHeight(80); _giveUpButton.SetText("Exit", 35); //Register for Observer Pattern foreach (BS_DiningTable diningTable in _servingArea.DiningTable) { diningTable.RegisterSideBar(_sideBar); } _btmBar.RegisterStove(_servingArea.Stoves); _servingArea.Player.RegisterHoldingFrame(_sideBar.HoldingFoodFrame); // }
// register side bar to show decreased game life public void RegisterSideBar(BS_SideBar sideBar) { _sideBar = sideBar; }