Esempio n. 1
0
 public void DeleteTreeType(TreeType type)
 {
     treeTypes.Remove(type);
     BoundaryChange();
 }
Esempio n. 2
0
        /// <summary>
        /// Add a new type of tree to the boundary.  The number of instances indicated are randomly placed
        /// in the boundary.
        ///
        /// NOTE - the request is queued here, and executed later.  This is due to a probable
        /// compiler or runtime bug that was causing it to fail when done here.
        /// </summary>
        /// <param name="filename">name of the speed tree description file for this tree species</param>
        /// <param name="size">size of the tree</param>
        /// <param name="sizeVariance">how much the size should vary</param>
        /// <param name="numInstances">number of instances of this tree type to make</param>
        public void AddTreeType(String filename, float size, float sizeVariance, uint numInstances)
        {
            TreeType type = new TreeType(filename, size, sizeVariance, numInstances);

            AddTreeType(type);
        }
Esempio n. 3
0
        public void EditTreeType(int index, String filename, float size, float sizeVariance, uint numInstances)
        {
            TreeType type = new TreeType(filename, size, sizeVariance, numInstances);
            treeTypes[index] = type;

            BoundaryChange();
        }
Esempio n. 4
0
 public void DeleteTreeType(TreeType type)
 {
     treeTypes.Remove(type);
     BoundaryChange();
 }
Esempio n. 5
0
 public void AddTreeType(TreeType type)
 {
     if (pendingTreeTypes == null)
     {
         pendingTreeTypes = new List<TreeType>();
     }
     if (treeTypes == null)
     {
         treeTypes = new List<TreeType>();
     }
     pendingTreeTypes.Add(type);
     treeTypes.Add(type);
 }
Esempio n. 6
0
        /// <summary>
        /// Add a new type of tree to the boundary.  The number of instances indicated are randomly placed
        /// in the boundary.
        /// 
        /// NOTE - the request is queued here, and executed later.  This is due to a probable
        /// compiler or runtime bug that was causing it to fail when done here.
        /// </summary>
        /// <param name="filename">name of the speed tree description file for this tree species</param>
        /// <param name="size">size of the tree</param>
        /// <param name="sizeVariance">how much the size should vary</param>
        /// <param name="numInstances">number of instances of this tree type to make</param>
        public void AddTreeType(String filename, float size, float sizeVariance, uint numInstances)
        {
            TreeType type = new TreeType(filename, size, sizeVariance, numInstances);

            AddTreeType(type);
        }