Ejemplo n.º 1
0
 public EditLevelViewModel(GameWorld gameWorld, Point currentPoint)
 {
     CurrentPoint = currentPoint;
     GameWorld = gameWorld;
     MapGraphicsTileSet = new MapGraphicsTileSet(System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + "\\MapTiles.xml");
     _errorTilePosition = -1;
 }
Ejemplo n.º 2
0
        public static void SaveMap(string filePath, GameWorld world)
        {
            Stream stream = File.Open(filePath, FileMode.Create);
            BinaryFormatter bf = new BinaryFormatter();

            bf.Serialize(stream, world);
            stream.Close();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Contstructor Method
        /// </summary>
        /// <param name="points">A list of points used to determine where to grab tiles from</param>
        public BuildMap(List<PointLatLng> points)
        {
            _backgroundWorker = new System.ComponentModel.BackgroundWorker();
            _points = points;
            _mapGraphicsTileSet = new MapGraphicsTileSet(System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + "\\MapTiles.xml");
            _gameWorld = new GameWorld();

            _backgroundWorker.WorkerReportsProgress = true;
            _backgroundWorker.WorkerSupportsCancellation = true;
            _backgroundWorker.DoWork += new DoWorkEventHandler(_backgroundWorker_DoWork);
        }
Ejemplo n.º 4
0
 public EditLevel(GameWorld gameWorld)
 {
     InitializeComponent();
 }