示例#1
0
 void Zoom()
 {
     testTree = currentIteration.ActiveLeaf.treeSpawn.GetScript <TreeSpawn> ().nextTree.GetScript <GivingTree> ();
     //Debug.Log (currentIteration.ActiveLeaf.treeSpawn.GetScript<TreeSpawn> ().nextTree.GetScript<GivingTree> ().Leaves.Length);
     //mainCamera.SetParent (currentIteration.ActiveLeaf.treeSpawn.GetScript<TreeSpawn> ().nextTree.GetScript<GivingTree> ().Leaves[4].treeSpawn); // lol
     mainCamera.SetParent(currentIteration.ActiveLeaf.treeSpawn.GetScript <TreeSpawn> ().nextTree);
     StartCoroutine(CoZoom());
 }
示例#2
0
        public Iteration(Transform givingTreeTransform, Transform parent, bool first = false)
        {
            this.givingTreeTransform = givingTreeTransform;
            Transform t = Instantiate(givingTreeTransform) as Transform;

            t.SetParent(parent);
            t.localPosition = Vector3.zero;
            this.givingTree = t.GetScript <GivingTree> ();
            this.givingTree.Create();
            if (!first)
            {
                t.localScale = new Vector3(0.1f, 0.1f, 0.1f);
            }
            leaves = this.givingTree.Leaves;
        }
示例#3
0
 public void Create(GivingTree givingTree)
 {
     treeSpawn.givingTree = givingTree;
 }
示例#4
0
 public void OnIterate(GivingTree nextTree)
 {
     treeSpawn.GetScript <TreeSpawn> ().OnIterate(nextTree.Leaves[4].treeSpawn);
 }