Пример #1
0
 public void CheckComplete(int divisor = 2)
 {
     cycle++;
     if (cycle == max / divisor)
     {
         whoAmI++;
         if (whoAmI < mDen.Length)
         {
             mDen[whoAmI]    = new MagnoDen();
             mDen[whoAmI].id = whoAmI;
             if (miniBiome)
             {
                 if (whoAmI % iterate == 0)
                 {
                     mDen[whoAmI].center = NewPosition(mDen[whoAmI - 1].center);
                 }
                 else
                 {
                     mDen[whoAmI].center = mDen[whoAmI - 1].center;
                 }
             }
             else
             {
                 mDen[whoAmI].center = mDen[whoAmI - 1].center;
             }
         }
     }
 }
Пример #2
0
 public void Start(MagnoDen den, bool miniBiome = true, int iterate = 8)
 {
     active       = true;
     this.iterate = iterate;
     mDen         = new MagnoDen[max];
     center       = new Vector2(centerX / 2, centerY);
     //  bounds = new Rectangle(leftBounds, centerY, leftBounds + width / 3, centerY + width / 4);
     origin = center;
     bounds = new Rectangle[max / iterate];
     for (int i = 0; i < bounds.Length; i++)
     {
         bounds[i] = Rectangle.Empty;
     }
     mDen[whoAmI]        = den;
     mDen[whoAmI].id     = whoAmI;
     mDen[whoAmI].center = center;
 }
Пример #3
0
 public MagnoDen GenerateNewMiner()
 {
     if (this == mDen[0])
     {
         whoAmI++;
         if (whoAmI == max)
         {
             FinalDig();
         }
         if (whoAmI < max)
         {
             mDen[whoAmI]        = new MagnoDen();
             mDen[whoAmI].center = NewPosition(mDen[whoAmI - 1].center);
         }
         else
         {
             Terminate();
         }
     }
     return(mDen[Math.Min(whoAmI, max - 1)]);
 }