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