Exemplo n.º 1
0
    void Start()
    {
        int i = 0;

        foreach (Plant p in GlobalControl.Instance.savedValues.availablePlants)
        {
            Debug.Log("saved plant" + p);
            GameObject plant = PlantUtilities.InstantiatePlant(p, blankPlant, transform); // spaceToPlace.transform.GetChild(i)
            plant.transform.localPosition = new Vector3(i, 1, 0);
            i++;
        }
    }
Exemplo n.º 2
0
 public void Start()
 {
     if (plant != null)   // This will be if a plant was selected to do work on
     {
         GameObject plantGO = PlantUtilities.InstantiatePlant(plant, blankPlant, transform);
         plantGO.transform.position = rootLocation.position;
     }
     else     // This is for creating a new plant. Only roots should be added here
     {
         plant = Instantiate(blankPlant, transform).GetComponent <PlantFrontEnd>().Plant;
         Debug.Log("New plant");
     }
 }