Beispiel #1
0
        public Map(MineBomberEngine engine, int width, int height)
        {
            FEngine = engine;
            MapSize = new Size(width, height);

            InitMap(width, height);
        }
Beispiel #2
0
        public Map(MineBomberEngine engine, int width, int height)
        {
            FEngine = engine;
            MapSize = new Size(width, height);

            InitMap(width, height);
        }
Beispiel #3
0
 public MySprite(
     MineBomberEngine fEngine,
     Point mapPoint,
     int width,
     int height,
     int stype,
     int nSurface) : base()
 {
     FEngine  = fEngine;
     MapPoint = mapPoint;
     Location = new Point(
         MineBomberEngine.CELL_SIZE * mapPoint.X,
         MineBomberEngine.CELL_SIZE * mapPoint.Y);
     _width     = width;
     _height    = height;
     _stype     = stype;
     _mineSpeed = 15;
     NSurface   = nSurface;
     Stopped    = true;
 }
 public MySprite(
     MineBomberEngine fEngine,
     Point mapPoint,
     int width,
     int height,
     int stype,
     int nSurface)
     : base()
 {
     FEngine = fEngine;
     MapPoint = mapPoint;
     Location = new Point(
         MineBomberEngine.CELL_SIZE * mapPoint.X,
         MineBomberEngine.CELL_SIZE * mapPoint.Y);
     _width = width;
     _height = height;
     _stype = stype;
     _mineSpeed = 15;
     NSurface = nSurface;
     Stopped = true;
 }
Beispiel #5
0
        private void Init()
        {
            Width = MineBomberEngine.SCREEN_WIDTH;
            Height = MineBomberEngine.SCREEN_HEIGHT;

            _game = new MineBomberEngine(this);

            _game.InitDraw();

            _game.CreateSurfaceFromBitmapN("mb_mans2.png", 0);//mb_mans.png
            _game.CreateSurfaceFromBitmapN("mb_elements.png", 1);
            _game.CreateSurfaceFromBitmapN("mb_fire.png", 2);
            _game.CreateSurfaceFromBitmapN("mb_stat.png", 3);
            //
            //              runscript('player 1 create 1 3 0 0');
            //  runscript('player 2 create 1 5 1 0');
            //  runscript('player 3 create 1 7 2 0');
            _game.MySprites[0] = new MySprite(
                _game,
                new Point(1, 3),
                MineBomberEngine.CELL_SIZE,
                MineBomberEngine.CELL_SIZE,
                0,
                0);

            _game.MySprites[1] = new MySprite(
                _game,
                new Point(1, 5),
                MineBomberEngine.CELL_SIZE,
                MineBomberEngine.CELL_SIZE,
                1,
                0);

            _game.GameMap.Load(null);

            _renderThread = new Thread(StartRender);
            _renderThread.Start();
        }