Ejemplo n.º 1
0
        public void ChangeMap(string name)
        {
            Map last = Active;
            Map map = maps.FirstOrDefault(
                m => m.Name == name);

            if (map == null)
            {
                map = new Map(name);
                map.Load();

                Active = map;
                maps.Add(map);
            }
            else
            {
                Active = map;
            }

            if (OnMapChanged != null)
            {
                OnMapChanged(this, new MapManagerEventArgs(last, Active));
            }
        }
Ejemplo n.º 2
0
 public MapManagerEventArgs(Map last, Map next)
 {
     Last = last;
     Next = next;
 }
Ejemplo n.º 3
0
        public void RemoveMap(Map map)
        {
            maps.Remove(map);

            if (ReferenceEquals(map, Active))
            {
                Active = null;
            }
        }