/// <summary> /// Update is called once per frame /// </summary> private void Update() { // Get sun object GameObject sun = GameObject.Find("Sphere"); SunRotation sunRotation = sun.GetComponent <SunRotation> (); // Pass color of sun and world position to shader material.SetColor("_PointLightColor", sunRotation.GetColor()); material.SetVector("_PointLightPosition", sunRotation.GetWorldPosition()); }
private void Awake() { // Move the game object just above the park transform.localPosition = new Vector3(-0.5f, 1f, -0.5f); // Initialize variables nbPointsParkX = 50; nbPointsParkZ = 100; metric = 0; beginningHourCFH = DEFAULT_BEGIN_HOUR; endingHourCFH = DEFAULT_END_HOUR; beginningHourSV = DEFAULT_BEGIN_HOUR; endingHourSV = DEFAULT_END_HOUR; sunRotation = GameObject.Find("Sun").GetComponent <SunRotation>(); }
void Awake() { landmarkVisibility = GameObject.Find("City").GetComponent <LandmarkVisibility>(); sunRotation = GameObject.Find("Sun").GetComponent <SunRotation>(); heatmap = GameObject.Find("Heatmap").GetComponent <Heatmap>(); }
void Awake() { sunRotation = GameObject.Find("Sun").GetComponent <SunRotation>(); }