public void Setup(BehaviorGrowth parent, GameObject prefab, Vector3 offset, Globals.Species species, float growthPeriod, int index) { Parent = parent; gameObject.transform.parent = parent.transform; FruitPrefab = prefab; this.index = index; transform.localPosition = offset; Species = species; GrowthPeriod = growthPeriod; }
public void SowSeed(GameObject prefab) { growth = Instantiate(prefab, transform).GetComponent <BehaviorGrowth>(); }