void Start()
 {
     if (isTree == true)
     {
         maxFruit = 5;
     }
     abundanceLevel      = Abundance.Young;
     sol                 = FindObjectOfType <SunControls>();
     sol.Photosynthesis += UpdateAbundance;
 }
Exemplo 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();
        }
        
    }
Exemplo 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;
 }