コード例 #1
0
ファイル: SkylightWeather.cs プロジェクト: CatsFromMars/Kura5
    // 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;
        }
    }
コード例 #2
0
ファイル: AnnieEffects.cs プロジェクト: CatsFromMars/Kura5
 // Use this for initialization
 void Start()
 {
     w = GameObject.FindGameObjectWithTag("Weather").GetComponent<WeatherSync>();
 }
コード例 #3
0
ファイル: SkylightFade.cs プロジェクト: CatsFromMars/Kura5
 // Update is called once per frame
 void Awake()
 {
     light = GetComponent<SpriteRenderer>().material;
     lightLevels = GameObject.FindGameObjectWithTag ("LightLevels").GetComponent<LightLevels>();
     w = GameObject.FindGameObjectWithTag ("Weather").GetComponent<WeatherSync>();
 }
コード例 #4
0
 // Use this for initialization
 void Awake()
 {
     globalData = GameObject.FindGameObjectWithTag("GameController");
     elements = globalData.GetComponent<ElementDatabase>();
     w = GameObject.FindGameObjectWithTag("Weather").GetComponent<WeatherSync>();
 }