public BS_ServingArea() { _gameTime = SwinGame.CreateTimer(); // Random the first energy potion _energyPotion = new BS_EnergyBall(); _energyPotion.SetX(_random.Next(10, 340)); _energyPotion.SetY(_random.Next(115, 190)); // // STOVE //2 table of stove _tableOfStoves = new BS_TableOfStove [2]; _tableOfStoves [0] = new BS_TableOfStove(); _tableOfStoves [1] = new BS_TableOfStove(); // //2 stove and bind corresponding table to it _stove = new BS_Stove [2]; _stove [0] = new BS_Stove(_tableOfStoves [0]); _stove [1] = new BS_Stove(_tableOfStoves [1]); _stoveManager = new BS_StoveManager(_stove); // // 4 Dining Tables _diningTables = new BS_WoodenTable [4]; for (int i = 0; i < 4; i++) { _diningTables [i] = new BS_WoodenTable(); } _diningTableManager = new BS_DiningTableManager(_diningTables); // // SwinGame.LoadBitmapNamed("floor", "white_floor.jpg"); _floor = SwinGame.CreateSprite(SwinGame.BitmapNamed("floor")); // // SwinGame.LoadBitmapNamed("sky", "sky_background.jpg"); _sky = SwinGame.CreateSprite(SwinGame.BitmapNamed("sky")); // // SwinGame.LoadBitmapNamed("sink", "Dustbin.png"); _dustbin = SwinGame.CreateSprite(SwinGame.BitmapNamed("sink")); // _player = new BS_Player(); _player.SetX(140); _player.SetY(120); }
public BS_Stove(BS_TableOfStove tableOfStove) { //set the food to cook to null and cooking state as false _foodToCook = ""; _cooking = false; // //bind the table _tableOfStove = tableOfStove; //create the stove SPRITE SwinGame.LoadBitmapNamed("stove", "stove.png"); _stove = SwinGame.CreateSprite(SwinGame.BitmapNamed("stove")); // //initiate _gameTime _gameTime = SwinGame.CreateTimer(); //initiate new BlUE status bar _statusBar = new BS_StatusBar("emptyThick.png"); _statusBar.SetFillingImage("blueThick.png"); // }