Permalink
Browse files

updated docs, renamed variables

  • Loading branch information...
GandhiGames committed Dec 18, 2016
1 parent 4d94f8d commit 90e978b4b7e7c0afa0106466f74c62e4893b8a33
View
Binary file not shown.
Binary file not shown.
@@ -32,10 +32,10 @@ void Update()
AppendLine("Moving: " + (!treeCreator.showingStationary ? "yes" : "no"));
switch (m_Current.treeType) {
case TreeBuilder.TreeType.Default:
case TreeBuilder.TreeType.Branching:
AppendLine ("Generation: " + m_Current.defaultGrowthCount);
AppendLine ("Initial Length: " + m_Current.defaultInitialLength);
AppendLine ("Length Degredation: " + m_Current.defaultLengthDegradation);
AppendLine ("Length Degredation: " + m_Current.defaultLengthReductionOnNewGeneration);
AppendLine ("Angle: " + m_Current.defaultAngle);
AppendLine ("Width: " + m_Current.defaultWidth);
break;
@@ -28,7 +28,7 @@ protected void DrawEditor()
switch (m_TreeBuilder.treeType) {
case TreeBuilder.TreeType.Default:
case TreeBuilder.TreeType.Branching:
ShowDefaultTreeOptions ();
break;
case TreeBuilder.TreeType.LTree:
@@ -51,7 +51,7 @@ private void ShowDefaultTreeOptions()
m_TreeBuilder.defaultBranchColour = EditorGUILayout.ColorField ("Branch Color", m_TreeBuilder.defaultBranchColour);
m_TreeBuilder.defaultGrowthCount = EditorGUILayout.IntField("Generations", m_TreeBuilder.defaultGrowthCount);
m_TreeBuilder.defaultInitialLength = EditorGUILayout.FloatField ("Initial Length", m_TreeBuilder.defaultInitialLength);
m_TreeBuilder.defaultLengthDegradation = EditorGUILayout.FloatField ("Length Degredation", m_TreeBuilder.defaultLengthDegradation);
m_TreeBuilder.defaultLengthReductionOnNewGeneration = EditorGUILayout.FloatField ("Length Multiplier On New Generation", m_TreeBuilder.defaultLengthReductionOnNewGeneration);
m_TreeBuilder.defaultAngle = EditorGUILayout.FloatField ("Angle", m_TreeBuilder.defaultAngle);
m_TreeBuilder.defaultWidth = EditorGUILayout.FloatField ("Branch Width", m_TreeBuilder.defaultWidth);
}
@@ -69,7 +69,7 @@ private void ShowLTreeOptions()
SerializedProperty rules = serializedObject.FindProperty ("lTreeRules");
EditorGUILayout.PropertyField(rules, true);
m_TreeBuilder.lTreeBranchLength = EditorGUILayout.FloatField ("Branch Initial Length", m_TreeBuilder.lTreeBranchLength);
m_TreeBuilder.lTreeBranchLength = EditorGUILayout.FloatField ("Branch Length", m_TreeBuilder.lTreeBranchLength);
m_TreeBuilder.lTreeAngle = EditorGUILayout.FloatField ("Angle", m_TreeBuilder.lTreeAngle);
SerializedProperty treeColors = serializedObject.FindProperty ("lTreeColours");
@@ -88,7 +88,7 @@ private void ShowColonizationOptions()
"Leaf Parent", m_TreeBuilder.colonizationLeafParent, typeof(Transform), true);
m_TreeBuilder.colonizationBranchColor = EditorGUILayout.ColorField ("Branch Color", m_TreeBuilder.colonizationBranchColor);
m_TreeBuilder.colonizationInitialLength = EditorGUILayout.FloatField ("Branch Initial Length", m_TreeBuilder.colonizationInitialLength);
m_TreeBuilder.colonizationWidth = EditorGUILayout.FloatField ("Branch Initial Width", m_TreeBuilder.colonizationWidth);
m_TreeBuilder.colonizationWidth = EditorGUILayout.FloatField ("Branch Width", m_TreeBuilder.colonizationWidth);
m_TreeBuilder.colonizationMinDistance = EditorGUILayout.FloatField ("Min Distance To Leaf", m_TreeBuilder.colonizationMinDistance);
m_TreeBuilder.colonizationMaxDistance = EditorGUILayout.FloatField ("Max Distance To Leaf", m_TreeBuilder.colonizationMaxDistance);
@@ -25,15 +25,15 @@ public abstract class TreeBuilder : MonoBehaviour
/// </summary>
public enum TreeType
{
Default,
Branching,
LTree,
Colonization
}
/// <summary>
/// The tree type to generate.
/// </summary>
public TreeType treeType = TreeType.Default;
public TreeType treeType = TreeType.Branching;
/// <summary>
/// The branch prefab. If tree to generate is moving then prefab should have MovingBranch script attached.
@@ -60,7 +60,7 @@ public enum TreeType
/// <summary>
/// The length degradation for the default tree. Branches are reduced in size by this factor.
/// </summary>
public float defaultLengthDegradation = 0.67f;
public float defaultLengthReductionOnNewGeneration = 0.67f;
/// <summary>
/// The angle for default tree branching.
@@ -186,9 +186,9 @@ protected Tree CreateTree ()
switch (treeType) {
case TreeType.Default:
case TreeType.Branching:
tree = new DefaultTree (defaultGrowthCount, defaultInitialLength,
defaultLengthDegradation, defaultAngle, defaultWidth,
defaultLengthReductionOnNewGeneration, defaultAngle, defaultWidth,
branchPrefab, defaultBranchColour, transform);
break;
case TreeType.LTree:
@@ -40,7 +40,7 @@ public class LTree : Tree
int steps,
string axiom,
LRule[] rules,
float initialLength,
float branchLength,
float angle, Transform owner, Color[] colors,
float width,
bool autoWidth,
@@ -51,7 +51,7 @@ public class LTree : Tree
m_Seed = axiom;
m_Rules = rules;
m_Sentence = m_Seed;
m_Length = initialLength;
m_Length = branchLength;
m_Angle = angle;
m_Owner = owner;
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1 @@
sceneSetups:
- path: Assets/Scenes/Shape Demo.unity
isLoaded: 1
isActive: 1
sceneSetups: []
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 90e978b

Please sign in to comment.