Пример #1
0
 public void DeleteTreeType(TreeType type)
 {
     treeTypes.Remove(type);
     BoundaryChange();
 }
Пример #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);
        }
Пример #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();
        }
Пример #4
0
 public void DeleteTreeType(TreeType type)
 {
     treeTypes.Remove(type);
     BoundaryChange();
 }
Пример #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);
 }
Пример #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);
        }