void Start()
 {
     if (isTree == true)
     {
         maxFruit = 5;
     }
     abundanceLevel      = Abundance.Young;
     sol                 = FindObjectOfType <SunControls>();
     sol.Photosynthesis += UpdateAbundance;
 }
Esempio n. 2
0
    /*
    ////////////////////
    Initilization
    ////////////////////
    */

    void Start () {
        mainMap = GetComponentInParent<MapGenerator>();
        sol = FindObjectOfType<SunControls>();
        if (isWater == true){
            currentType = Type.Liquid;
            abundanceLevel = Abundance.Barron;
            InstanceType();
        }
        else {
            currentType = Type.Solid;
            abundanceLevel = Abundance.Empty;
            if (sol != null) { sol.Photosynthesis += UpdateAbundance; }
            InstanceType();
            setSurfaceTexture();
        }
        
    }
Esempio n. 3
0
    /*
     * ////////////////////
     * Initilization
     * ////////////////////
     */

    void Start()
    {
        mainMap = GetComponentInParent <MapGenerator>();
        sol     = FindObjectOfType <SunControls>();
        if (isWater == true)
        {
            currentType    = Type.Liquid;
            abundanceLevel = Abundance.Barron;
            InstanceType();
        }
        else
        {
            currentType    = Type.Solid;
            abundanceLevel = Abundance.Empty;
            if (sol != null)
            {
                sol.Photosynthesis += UpdateAbundance;
            }
            InstanceType();
            setSurfaceTexture();
        }
    }
 void Start () {
     if (isTree == true) { maxFruit = 5; }
     abundanceLevel = Abundance.Young;
     sol = FindObjectOfType<SunControls>();
     sol.Photosynthesis += UpdateAbundance;
 }