示例#1
0
 public PrefabManager(TerrainSettings s)
 {
     th       = new TransformHelpers();
     Pool     = new PrefabPool();
     settings = s;
     InstantiatePrefabManagerObject();
 }
示例#2
0
 public TerrainManager(TerrainSettings s)
 {
     Pool      = new TerrainPool();
     VertexGen = new VertexGenerator(s);
     settings  = s;
     InstantiateTerrainObject();
 }
示例#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;
        }
示例#4
0
 public TerrainPiece(TerrainSettings s)
 {
     settings   = s;
     MeshPieces = new List <MeshPiece>();
 }
示例#5
0
 public MeshPiece(VertexGenerator vg, Plane planeType, TerrainSettings s)
 {
     this.vg         = vg;
     PlaneType       = planeType;
     TerrainSettings = s;
 }