Ejemplo n.º 1
0
 // Get the world size from the config, and use it to generate the correct-sized level
 protected virtual IEnumerator LoadWorld()
 {
     yield return(MapBuilder.GenerateMap(
                      MapBuilderSettings,
                      transform,
                      Worker.Connection,
                      Worker.WorkerType,
                      Worker.LogDispatcher,
                      this));
 }
Ejemplo n.º 2
0
        // Get the world size from the config, and use it to generate the correct-sized level
        protected virtual IEnumerator LoadWorld()
        {
            var worldSize = GetWorldSize();

            if (worldSize <= 0)
            {
                yield break;
            }

            yield return(MapBuilder.GenerateMap(
                             mapTemplate,
                             worldSize,
                             transform,
                             Worker.WorkerType,
                             this));
        }
        // Get the world size from the config, and use it to generate the correct-sized level
        protected virtual IEnumerator LoadWorld()
        {
            // Defer a frame to allow worker flags to propagate.
            yield return(null);

            var worldSize = GetWorldSize();

            if (worldSize <= 0)
            {
                yield break;
            }

            yield return(MapBuilder.GenerateMap(
                             mapTemplate,
                             worldSize,
                             transform,
                             Worker.WorkerType,
                             this));
        }