Beispiel #1
0
        public override void PreUpdate()
        {
            /*
             * count++;
             * if(count >= 100)
             * {
             *      count = 0;
             *      Main.NewText(Liquid.numLiquid +","+ LiquidBuffer.numLiquidBuffer + "," + LiquidBuffer2.numLiquidBuffer);
             * }
             */

            if (quickSwitch)
            {
                Liquid.cycles       = 1;
                Liquid.panicCounter = 0;

                while (LiquidBuffer.numLiquidBuffer > 5000 && LiquidBuffer2.numLiquidBuffer != 100000 - 1)
                {
                    LiquidBuffer2.AddBuffer(Main.liquidBuffer[LiquidBuffer.numLiquidBuffer - 1].x, Main.liquidBuffer[LiquidBuffer.numLiquidBuffer - 1].y);
                    LiquidBuffer.DelBuffer(LiquidBuffer.numLiquidBuffer - 1);
                }
                while (LiquidBuffer.numLiquidBuffer < 5000 && LiquidBuffer2.numLiquidBuffer != 0)
                {
                    //LiquidBuffer.AddBuffer(liquidBuffer2[LiquidBuffer2.numLiquidBuffer].x,liquidBuffer2[LiquidBuffer2.numLiquidBuffer].y);
                    Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].x = liquidBuffer2[LiquidBuffer2.numLiquidBuffer - 1].x;
                    Main.liquidBuffer[LiquidBuffer.numLiquidBuffer].y = liquidBuffer2[LiquidBuffer2.numLiquidBuffer - 1].y;
                    LiquidBuffer.numLiquidBuffer++;

                    LiquidBuffer2.DelBuffer(LiquidBuffer2.numLiquidBuffer - 1);
                }

                Liquid.UpdateLiquid();
            }
        }
Beispiel #2
0
 public QuickLiquid()
 {
     for (int i = 0; i < liquidBuffer2.Length; i++)
     {
         liquidBuffer2[i] = new LiquidBuffer2();
     }
 }