private GameObject CreateBranch(GameObject obj, float angle) { var obj2 = GameObject.Instantiate(_gen.BranchPrefab, Vector3.zero, Quaternion.identity, _gen.transform); return(_branchUpdator.UpdateBranch(obj, angle, obj2)); }
void UpdateAngle(Branch root) { var mainAngle = 360f / _gen.BranchingCount; var slide = _gen.GetTop(root.GameObject); for (var index = 0; index < root.Branches.Count; index++) { var rootBranch = root.Branches[index]; _branchUpdator.UpdateBranch(root.GameObject, mainAngle * index, rootBranch.GameObject); UpdateAngle(rootBranch); } }