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) { }
public MoveTool(Map map) : base(map) { }
protected UniqueMandatoryMapElement(Map map) : base(map) { }
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; }
public Goal(Map map) : base(map) { }
public Disc(Map map) : base(map) { }
protected MapTool(Map map) { _map = map; }
private void OnResetClick(object sender, RoutedEventArgs e) { Map = new Map(); MapArea.Children.Clear(); }
public Robot(Map map) : base(map) {}