public void Dispose() { Players.Clear(); Enemies.Clear(); Quests.Clear(); Pets.Clear(); Projectiles.Clear(); StaticObjects.Clear(); ItemEntities.Clear(); Timers.Clear(); }
protected void FromWorldMap(Stream dat) { log.InfoFormat("Loading map for world {0}({1})...", Id, Name); Map = new Wmap(Manager.GameData); entityInc = 0; entityInc += Map.Load(dat, 0); int w = Map.Width, h = Map.Height; EnemiesCollision = new CollisionMap <Entity>(0, w, h); PlayersCollision = new CollisionMap <Entity>(1, w, h); Projectiles.Clear(); StaticObjects.Clear(); Enemies.Clear(); Players.Clear(); ItemEntities.Clear(); foreach (Entity i in Map.InstantiateEntities(Manager)) { EnterWorld(i); } }