massive number of fixes, removed compilation error, logs, negative scale issues, serialization issues ETC
This commit is contained in:
@@ -34,11 +34,13 @@ namespace Beyond
|
||||
{
|
||||
public TreeState treeState;
|
||||
public float health = 100;
|
||||
public bool isEnabled = true;
|
||||
|
||||
public TreeStateData(TreeState treeState, float health)
|
||||
public TreeStateData(TreeState treeState, float health, bool isEnabled)
|
||||
{
|
||||
this.treeState = treeState;
|
||||
this.health = health;
|
||||
this.isEnabled = isEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +75,8 @@ namespace Beyond
|
||||
[SerializeField] private List<Renderer> woodRenderers, leavesRenderers;
|
||||
private List<Material> woodMaterials = new(), leavesMaterials = new();
|
||||
|
||||
private string woodColorName = "BaseColor",
|
||||
leavesColorName = "BaseColor";
|
||||
private string woodColorName = "_BaseColor",
|
||||
leavesColorName = "_BaseColor";
|
||||
|
||||
[SerializeField] public bItemListData items;
|
||||
|
||||
@@ -251,13 +253,17 @@ namespace Beyond
|
||||
}
|
||||
|
||||
currentTreeState = treeState;
|
||||
if (instant)
|
||||
//TODO make sure that is enough to deal with saved state and disabled trees
|
||||
if (gameObject.activeInHierarchy)
|
||||
{
|
||||
StartCoroutine(SetInstantTreeSizeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(SetAnimationTreeCoroutine(animationValue, animationName, animLayer));
|
||||
if (instant)
|
||||
{
|
||||
StartCoroutine(SetInstantTreeSizeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(SetAnimationTreeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
}
|
||||
onStateChanged?.Invoke(currentTreeState);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user