/// <summary> /// Evaluates the sunlight satisfaction of a sunlight definition for the given sunlight type. /// </summary> public float EvaluateSunlightSatisfaction(SunlightDefinition.Sunlight sun) { for (int i = sunlightDefinitions.Count; i-- > 0;) { if (sunlightDefinitions[i].Need == sun) { return(sunlightDefinitions[i].Satisfaction.Evaluate(EnvironmentData.Instance.SunIntensity)); } } Debug.LogError("[SunlightManifest] Unable to find sunlight definition: " + sun.ToString()); return(0f); }
public AnimationCurve GetSunlightSatisfactionCurve(SunlightDefinition.Sunlight sun) { for (int i = sunlightDefinitions.Count; i-- > 0;) { if (sunlightDefinitions[i].Need == sun) { return(sunlightDefinitions[i].Satisfaction); } } Debug.LogError("[SunlightManifest] Unable to find sunlight definition: " + sun.ToString()); return(null); }