コード例 #1
0
 private void RainCycle_ctor(On.RainCycle.orig_ctor orig, RainCycle self, World world, float minutes)
 {
     orig(self, world, minutes);
     if (config.MaxCycleTime)
     {
         self.cycleLength = 33600;
     }
 }
コード例 #2
0
ファイル: RainFall.cs プロジェクト: LeeMoriya/Downpour
 private static void RainCycle_RainHit(On.RainCycle.orig_RainHit orig, RainCycle self)
 {
     if (Downpour.snow && Downpour.blizzard)
     {
         return;
     }
     orig.Invoke(self);
 }
コード例 #3
0
ファイル: CycleMod.cs プロジェクト: LeeMoriya/CycleConfig
 private static void RainCycle_Update(On.RainCycle.orig_Update orig, RainCycle self)
 {
     orig.Invoke(self);
     if (fixedCycle && fixedCycleLength == 61 / 2 * 60)
     {
         if (self.timer > 2500)
         {
             self.timer = 2500;
         }
     }
 }
コード例 #4
0
ファイル: CycleMod.cs プロジェクト: LeeMoriya/CycleConfig
 private static void RainCycle_ctor(On.RainCycle.orig_ctor orig, RainCycle self, World world, float minutes)
 {
     if (customCycleLength)
     {
         float length;
         if (fixedCycle)
         {
             length = (float)fixedCycleLength / 60f;
             if (fixedCycleLength == 61 / 2 * 60)
             {
                 length = 32000 / 60 / 40;
             }
         }
         else
         {
             length = Mathf.Lerp((float)minimumCycleLength, (float)maximumCycleLength, UnityEngine.Random.value) / 60f;
         }
         orig.Invoke(self, world, length);
     }
     else
     {
         orig.Invoke(self, world, minutes);
     }
 }