Exemple #1
0
 public PrefabManager(TerrainSettings s)
 {
     th       = new TransformHelpers();
     Pool     = new PrefabPool();
     settings = s;
     InstantiatePrefabManagerObject();
 }
Exemple #2
0
 public TerrainManager(TerrainSettings s)
 {
     Pool      = new TerrainPool();
     VertexGen = new VertexGenerator(s);
     settings  = s;
     InstantiateTerrainObject();
 }
Exemple #3
0
        public VertexGenerator(TerrainSettings s)
        {
            TerrainRules = s.Rules;
            settings     = s;
            if (TerrainRules == null || TerrainRules.Count == 0)
            {
                throw new System.Exception("Terrain rules required to generate vertices");
            }

            //Move to the first rule
            CurrentTerrainRule = TerrainRules[0];

            //Initialize some other values
            RuleStartLocation     = 0;
            CurrentLocation       = 0;
            TotalDistanceTraveled = 0;

            LoopRules = true;
        }
Exemple #4
0
 public TerrainPiece(TerrainSettings s)
 {
     settings   = s;
     MeshPieces = new List <MeshPiece>();
 }
Exemple #5
0
 public MeshPiece(VertexGenerator vg, Plane planeType, TerrainSettings s)
 {
     this.vg         = vg;
     PlaneType       = planeType;
     TerrainSettings = s;
 }