Example #1
0
    public new void Start()
    {
        base.Start();
        Debug.Assert(maxWater > 0);
        Debug.Assert(wateringAmount > 0);

        plantReg = FindObjectOfType <PlanterRegistry>();
    }
Example #2
0
 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);
 }
Example #3
0
    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>();
    }