Exemplo n.º 1
0
 public void LeaveCopy()
 {
     advanceNode        = new FibPlantNode(this, go.transform.position, global);
     advanceNode.active = false;
     advanceNode.age    = age;
     advanceNode.UpdateName();
 }
Exemplo n.º 2
0
 public FibPlantNode(FibPlantNode fromNode0, Vector3 position, FibPlantGlobal global0)
 {
     fromNode = fromNode0;
     global   = global0;
     global.nodes.Add(this);
     index = global.nodes.Count - 1;
     go    = GameObject.CreatePrimitive(PrimitiveType.Cube);
     go.transform.position = position;
     UpdateName();
 }
Exemplo n.º 3
0
 public void Advance()
 {
     //LeaveCopy();
     go.transform.position += Vector3.up * global.levelHeight;
     UpdateLink();
     if (age >= 2)
     {
         childNode = new FibPlantNode(this, new Vector3(1, 0, 0), global);
     }
     age++;
     UpdateName();
 }
Exemplo n.º 4
0
 void Start()
 {
     global = new FibPlantGlobal();
     FibPlantNode node = new FibPlantNode(null, Vector3.zero, global);
 }