public MapEditor()
 {
     InitializeComponent();
     ToggleSelection(Tools.Wall, true);
     
     Map = new Map();
 }
		public void Save(string filename, Map map)
		{
			using (var fileStream = File.Create(filename))
			{
				Serializer.Value.Serialize(fileStream, map);
			}
		}
		public void Bind(Map map)
		{
			if (Map == null)
			{
				Map = map;
			}
			else
			{
				throw new InvalidOperationException("Map Element already bound to Map.");
			}
		}
 public RemoveTool(Map map) : base(map)
 { }
예제 #5
0
		public MoveTool(Map map) : base(map)
		{ }
		protected UniqueMandatoryMapElement(Map map) : base(map)
		{ }
예제 #7
0
		public Wall(Map map) : base(map)
		{
			EndPoint = new Point();
		}
        public void Dispose()
        {
            CyclesStop();
            _ticks = 0;

            _map = null;
            _mapArea.Children.Clear();
            if (_robot != null) _robot.Dispose();
            if (_minimap != null) _minimap.Dispose();

            _lblOutput.Content = "";
            _state = CycleState.Initiated;
        }
        public void Reset()
        {
            Dispose();

            if (_filename != null)
            {
                _map = Resolver.StorageManager.Load(_filename);
                _mapArea.Children.Clear();
                _map.ApplyToCanvas(_mapArea);

                buildMap();
            }
        }
		protected MapElement(Map map)
		{
			Bind(map);
			StartPosition = new Point();
            IsCollidable = true;
		}
예제 #11
0
		public Goal(Map map) : base(map)
		{ }
예제 #12
0
		public Disc(Map map) : base(map)
		{ }
예제 #13
0
 protected MapTool(Map map)
 {
     _map = map;
 }
 private void OnResetClick(object sender, RoutedEventArgs e)
 {
     Map = new Map();
     MapArea.Children.Clear();
 }
예제 #15
0
 public Robot(Map map) : base(map) {}