Esempio n. 1
0
        public void TurnOn(WeatherSystem.RainTypes type)
        {
            this.CurrentType = type;
            this.State       = WeatherSystem.States.Raining;
            this.UsingSnow   = (LocalPlayer.Stats && LocalPlayer.Stats.IsInNorthColdArea() && LocalPlayer.IsInOutsideWorld);
            Scene.RainFollowGO.SetActive(true);
            Scene.RainTypes.SnowConstant.SetActive(false);
            switch (type)
            {
            case WeatherSystem.RainTypes.Light:
                if (this.UsingSnow)
                {
                    Scene.RainTypes.SnowLight.SetActive(true);
                }
                else
                {
                    Scene.RainTypes.RainLight.SetActive(true);
                }
                break;

            case WeatherSystem.RainTypes.Medium:
                if (this.UsingSnow)
                {
                    Scene.RainTypes.SnowMedium.SetActive(true);
                }
                else
                {
                    Scene.RainTypes.RainMedium.SetActive(true);
                }
                break;

            case WeatherSystem.RainTypes.Heavy:
                if (this.UsingSnow)
                {
                    Scene.RainTypes.SnowHeavy.SetActive(true);
                }
                else
                {
                    Scene.RainTypes.RainHeavy.SetActive(true);
                }
                break;

            default:
                this.AllOff();
                break;
            }
        }
Esempio n. 2
0
 public void AllOff()
 {
     this.CurrentType = WeatherSystem.RainTypes.None;
     Scene.RainTypes.RainLight.SetActive(false);
     Scene.RainTypes.RainMedium.SetActive(false);
     Scene.RainTypes.RainHeavy.SetActive(false);
     Scene.RainTypes.SnowLight.SetActive(false);
     Scene.RainTypes.SnowMedium.SetActive(false);
     Scene.RainTypes.SnowHeavy.SetActive(false);
     this.UsingSnow = (LocalPlayer.Stats && LocalPlayer.Stats.IsInNorthColdArea());
     if (this.UsingSnow)
     {
         Scene.RainFollowGO.SetActive(true);
         Scene.RainTypes.SnowConstant.SetActive(true);
     }
     else
     {
         Scene.RainFollowGO.SetActive(false);
         Scene.RainTypes.SnowConstant.SetActive(false);
     }
 }