public new void Start() { base.Start(); Debug.Assert(maxWater > 0); Debug.Assert(wateringAmount > 0); plantReg = FindObjectOfType <PlanterRegistry>(); }
public new void Start() { base.Start(); planterReg = FindObjectOfType <PlanterRegistry>(); Debug.Assert(planterReg != null); planterReg.RegisterPlanter(this); fruitReg = FindObjectOfType <FruitRegistry>(); Debug.Assert(fruitReg != null); fruitParent = fruitReg.GetFruitParent(); Debug.Assert(fruitParent != null); particleSystem = gameObject.GetComponent <ParticleSystem>(); Debug.Assert(particleSystem); }
public new void Start() { base.Start(); //Set the Incect to a Random Height Vector3 curPos = transform.position; curPos.y = Random.Range(minFlightHeight, maxFlightHeight); transform.position = curPos; //Decide if the Insect starts flying up or down up = (Random.value > 0.5f); planterReg = FindObjectOfType <PlanterRegistry>(); SearchNewTarget(); seedReg = FindObjectOfType <SeedRegistry>(); }