/// <summary>
 /// Initializes a new instance of the <see cref="XnaEntityManager"/> class.
 /// </summary>
 /// <param name="map">The map.</param>
 public XnaEntityManager(Map map)
     : base(map)
 {
 }
Example #2
0
        public virtual void Update(InputManager inputmanager, float deltatime)
        {
            foreach (var map in Maps.Values)
            {
                if (map.IsActive())
                {
                    map.Update(inputmanager, deltatime);
                }
            }

            Map[] maparray = new Map[Maps.Values.Count];
            Maps.Values.CopyTo(maparray, 0);

            foreach (var map in maparray)
            {
                map.Entities.HandleDoors();
            }
        }
Example #3
0
        /// <summary>
        /// Loads the map from file.
        /// </summary>
        /// <param name="mappath">The map's path.</param>
        /// <returns></returns>
        public virtual Map LoadMap(string mappath)
        {
            Map map = new Map(mappath);
            map.World = this;

            return map;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityManager"/> class.
 /// </summary>
 /// <param name="map">The map.</param>
 public EntityManager(Map map)
 {
     Entities = new Dictionary<string, Entity>();
     Map = map;
 }