// Use this for initialization void Start() { w = GameObject.FindGameObjectWithTag ("Weather").GetComponent<WeatherSync>(); light = lightProjector.GetComponent<Projector>().material; shadows = GameObject.FindGameObjectsWithTag("Shadow"); skylights = GameObject.FindGameObjectsWithTag("Sunlight"); Debug.Log (w.conditionID); if(!isIndoors) { updateWeatherEffects(); if(snowProjector != null) { if(conditionName == "Snow") { snowProjector.SetActive(true); snowActive = true; } else if(snowProjector != null) { snowProjector.SetActive(false); snowActive = false; } } else snowActive = false; } }
// Use this for initialization void Start() { w = GameObject.FindGameObjectWithTag("Weather").GetComponent<WeatherSync>(); }
// Update is called once per frame void Awake() { light = GetComponent<SpriteRenderer>().material; lightLevels = GameObject.FindGameObjectWithTag ("LightLevels").GetComponent<LightLevels>(); w = GameObject.FindGameObjectWithTag ("Weather").GetComponent<WeatherSync>(); }
// Use this for initialization void Awake() { globalData = GameObject.FindGameObjectWithTag("GameController"); elements = globalData.GetComponent<ElementDatabase>(); w = GameObject.FindGameObjectWithTag("Weather").GetComponent<WeatherSync>(); }