// Update is called once per frame void Update() { /*if (timeUntilGrowth <= 0f) { * timeUntilGrowth = 70f; * if (treeAge < 5) { * baseBranch.growChildren (); * if (treeAge >= 1) { * for (int i = 0; i < 5 - treeAge; i++) { * baseBranch.growLeafs (); * } * } * treeAge++; * } * } else { * timeUntilGrowth -= 1f; * }*/ if (Input.GetKeyUp(KeyCode.P)) { baseBranch.growChildren(); } if (Input.GetKeyUp(KeyCode.O)) { baseBranch.growLeafs(); } if (Input.GetKeyUp(KeyCode.X)) { DestroyImmediate(baseBranch.gameObject); this.setup(); } }