public void InitBurstRain()
 {
     this.deathRain = new GlobalRain.DeathRain(this);
     (this.deathRain as patch_DeathRain).BurstDeathRain();
 }
 public void Update()
 {
     if (UnityEngine.Random.value < 0.025f)
     {
         this.rainDirectionGetTo = Mathf.Lerp(-1f, 1f, UnityEngine.Random.value);
     }
     this.lastRainDirection = this.rainDirection;
     this.rainDirection     = Mathf.Lerp(this.rainDirection, this.rainDirectionGetTo, 0.01f);
     if (this.rainDirection < this.rainDirectionGetTo)
     {
         this.rainDirection = Mathf.Min(this.rainDirection + 0.0125f, this.rainDirectionGetTo);
     }
     else if (this.rainDirection > this.rainDirectionGetTo)
     {
         this.rainDirection = Mathf.Max(this.rainDirection - 0.0125f, this.rainDirectionGetTo);
     }
     if (this.deathRain != null)
     {
         this.deathRain.DeathRainUpdate();
         if ((this.deathRain as patch_DeathRain).isBurstDeathRain())
         {
             if (this.game.IsStorySession && this.deathRain.deathRainMode >= (GlobalRain.DeathRain.DeathRainMode)patch_GlobalRain.patch_DeathRain.DeathRainMode.BurstEnd)
             {
                 this.floodSpeed = Mathf.Max(0.0f, this.floodSpeed - 0.0005f);
             }
             else if (this.game.IsStorySession && this.deathRain.deathRainMode > (GlobalRain.DeathRain.DeathRainMode)patch_GlobalRain.patch_DeathRain.DeathRainMode.BurstGradeABuildUp)
             {
                 this.floodSpeed = Mathf.Min(0.2f, this.floodSpeed + 0.0025f);
             }
             else if (this.game.IsArenaSession && this.deathRain.deathRainMode >= (GlobalRain.DeathRain.DeathRainMode)patch_GlobalRain.patch_DeathRain.DeathRainMode.BurstEnd)
             {
                 this.floodSpeed = Mathf.Max(0.0f, this.floodSpeed - 0.005f);
             }
             else if (this.game.IsArenaSession && this.deathRain.deathRainMode >= (GlobalRain.DeathRain.DeathRainMode)patch_GlobalRain.patch_DeathRain.DeathRainMode.BurstGradeABuildUp)
             {
                 this.floodSpeed = Mathf.Min(0.4f, this.floodSpeed + 0.006666667f);
             }
             //this.flood += this.floodSpeed;
             if ((this.deathRain as patch_DeathRain).destroy)
             {
                 this.deathRain = null;
                 floodSpeed     = 0;
             }
         }
         else
         {
             if (this.game.IsStorySession && this.deathRain.deathRainMode > GlobalRain.DeathRain.DeathRainMode.GradeABuildUp)
             {
                 this.floodSpeed = Mathf.Min(0.8f, this.floodSpeed + 0.0025f);
             }
             else if (this.game.IsArenaSession && this.deathRain.deathRainMode >= GlobalRain.DeathRain.DeathRainMode.GradeABuildUp)
             {
                 this.floodSpeed = Mathf.Min(1.8f, this.floodSpeed + 0.006666667f);
             }
             this.flood += this.floodSpeed;
         }
     }
     else
     {
         this.floodSpeed = 0;
         this.Intensity  = Mathf.InverseLerp(600f, 200f, (float)this.game.world.rainCycle.TimeUntilRain) * 0.24f;
     }
 }
 public void InitDeathRain()
 {
     this.deathRain = new GlobalRain.DeathRain(this);
 }