示例#1
0
 /// <summary>Called by World</summary>
 internal static void InitTerrain()
 {
     if (TerrainMgr.Provider == null)
     {
         TerrainMgr.Provider = (ITerrainProvider) new DefaultTerrainProvider();
     }
     foreach (MapTemplate mapTemplate in WCell.RealmServer.Global.World.MapTemplates)
     {
         if (mapTemplate != null)
         {
             TerrainMgr.Terrains[(int)mapTemplate.Id] = TerrainMgr.Provider.CreateTerrain(mapTemplate.Id);
         }
     }
 }
示例#2
0
 /// <summary>Called by World</summary>
 internal static void InitTerrain()
 {
     if (Provider == null)
     {
         Provider = new DefaultTerrainProvider();
     }
     foreach (MapTemplate mapTemplate in World.MapTemplates)
     {
         if (mapTemplate != null)
         {
             Terrains[(int)mapTemplate.Id] = Provider.CreateTerrain(mapTemplate.Id);
         }
     }
 }
示例#3
0
		/// <summary>
		/// Called by World
		/// </summary>
		internal static void InitTerrain()
		{
			if (Provider == null)
			{
			    Provider = new DefaultTerrainProvider();
			}

			foreach (var rgn in World.RegionInfos)
			{
				if (rgn != null)
				{
					Terrains[(int) rgn.Id] = Provider.CreateTerrain(rgn.Id);
				}
			}
		}
示例#4
0
        /// <summary>
        /// Called by World
        /// </summary>
        internal static void InitTerrain()
        {
            if (Provider == null)
            {
                Provider = new DefaultTerrainProvider();
            }

            foreach (var rgn in World.MapTemplates)
            {
                if (rgn != null)
                {
                    Terrains[(int)rgn.Id] = Provider.CreateTerrain(rgn.Id);
                }
            }
        }
示例#5
0
        private Engine()
        {
            this.enemies = EnemiesProvider.Instance;
            this.terrain = TerrainProvider.Instance;

            this.terrainGenerator = TerrainGenerator.Instance;

            this.drawer            = new ConsoleDrawer();
            this.projectileFactory = new ProjectileFactory();

            this.terrain.Terrain = terrainGenerator.GenerateRandomMap(Constants.TerrainCountOnMap).ToList();
            this.mover           = Mover.Instance;

            this.firstPlayer  = this.terrainGenerator.GenerateFirstPlayer();
            this.secondPlayer = this.terrainGenerator.GenerateSecondPlayer();
        }