示例#1
0
        public void StartGame(Civilization playerCivilization, ArrayList civilizations, string leaderName, WorldSize mapSize)
        {
            _cityBitmap = new Bitmap("City.bmp");
            _cityBitmap.MakeTransparent(TransparentColor.Value);
            _gameRoot      = GameRoot.GetGameRoot();
            _villageBitmap = new Bitmap("village.bmp");
            _villageBitmap.MakeTransparent(TransparentColor.Value);
            _roadNSBitmap = new Bitmap("road_ns.bmp");
            _roadNSBitmap.MakeTransparent(TransparentColor.Value);
            _roadEWBitmap = new Bitmap("road_ew.bmp");
            _roadEWBitmap.MakeTransparent(TransparentColor.Value);
            _activeBitmap = new Bitmap("active.bmp");
            _activeBitmap.MakeTransparent(TransparentColor.Value);
            _irrigationBitmap = new Bitmap("irrigation.bmp");
            _irrigationBitmap.MakeTransparent(TransparentColor.Value);
            _grassBitmap = new Bitmap(@"images\grass.bmp");
            _grassBitmap.MakeTransparent(TransparentColor.Value);

            _gameRoot.StatusChanged += new StatusChangedEventHandler(OnStatusChanged);
            _gameRoot.MapSize        = mapSize;
            _gameRoot.Start(playerCivilization, civilizations, leaderName);
        }