Пример #1
0
        public MWMarioServingArea()
        {
            _mariogameTime = SwinGame.CreateTimer();

            // Random the first energy potion
            _marioenergyPotion = new MWEnergyBall();
            _marioenergyPotion.SetX(_mariorandom.Next(10, 340));
            _marioenergyPotion.SetY(_mariorandom.Next(115, 190));
            //

            // STOVE
            //2 table of stove
            _mariotableOfStoves    = new TableOfStove[2];
            _mariotableOfStoves[0] = new TableOfStove();
            _mariotableOfStoves[1] = new TableOfStove();
            //
            //2 stove and bind corresponding table to it
            _mariostove    = new Stove[2];
            _mariostove[0] = new Stove(_mariotableOfStoves[0]);
            _mariostove[1] = new Stove(_mariotableOfStoves[1]);

            _mariostoveManager = new StoveManager(_mariostove);
            //

            // 4 Dining Tables
            _mariodiningTables = new MWMarioWoodenTable[4];
            for (int i = 0; i < 4; i++)
            {
                _mariodiningTables[i] = new MWMarioWoodenTable();
            }
            _mariodiningTableManager = new MWMarioDiningTableManager(_mariodiningTables);
            //

            //
            SwinGame.LoadBitmapNamed("floor", "white_floor.jpg");
            _mariofloor = SwinGame.CreateSprite(SwinGame.BitmapNamed("floor"));
            //

            //
            SwinGame.LoadBitmapNamed("sky", "sky_background.jpg");
            _mariosky = SwinGame.CreateSprite(SwinGame.BitmapNamed("sky"));
            //

            //
            SwinGame.LoadBitmapNamed("sink", "Dustbin.png");
            _mariodustbin = SwinGame.CreateSprite(SwinGame.BitmapNamed("sink"));
            //

            _marioplayer = new MWPlayer();
            _marioplayer.SetX(140);
            _marioplayer.SetY(120);
        }