QuickDustLine() public static method

public static QuickDustLine ( Vector2 start, Vector2 end, float splits, Color color ) : void
start Vector2
end Vector2
splits float
color Color
return void
Ejemplo n.º 1
0
        // Token: 0x0600004D RID: 77 RVA: 0x0000824C File Offset: 0x0000644C
        public static void CheckArenaScore(Vector2 arenaCenter, out Point xLeftEnd, out Point xRightEnd, int walkerWidthInTiles = 5, int walkerHeightInTiles = 10)
        {
            bool  flag  = false;
            Point point = arenaCenter.ToTileCoordinates();

            xLeftEnd = (xRightEnd = point);
            int num;
            int y;

            Collision.ExpandVertically(point.X, point.Y, out num, out y, 0, 4);
            point.Y = y;
            if (flag)
            {
                Dust.QuickDust(point, Color.Blue).scale = 5f;
            }
            int   num2;
            Point point2;

            StrayMethods.SendWalker(point, walkerHeightInTiles, -1, out num2, out point2, 120, flag);
            int   num3;
            Point point3;

            StrayMethods.SendWalker(point, walkerHeightInTiles, 1, out num3, out point3, 120, flag);
            point2.X++;
            point3.X--;
            if (flag)
            {
                Dust.QuickDustLine(point2.ToWorldCoordinates(8f, 8f), point3.ToWorldCoordinates(8f, 8f), 50f, Color.Pink);
            }
            xLeftEnd  = point2;
            xRightEnd = point3;
        }
Ejemplo n.º 2
0
        public static void CheckArenaScore(
            Vector2 arenaCenter,
            out Point xLeftEnd,
            out Point xRightEnd,
            int walkerWidthInTiles  = 5,
            int walkerHeightInTiles = 10)
        {
            bool  showDebug       = false;
            Point tileCoordinates = arenaCenter.ToTileCoordinates();

            xLeftEnd = xRightEnd = tileCoordinates;
            int bottomY;

            Collision.ExpandVertically(tileCoordinates.X, tileCoordinates.Y, out int _, out bottomY, 0, 4);
            tileCoordinates.Y = bottomY;
            if (showDebug)
            {
                Dust.QuickDust(tileCoordinates, Color.Blue).scale = 5f;
            }
            Point lastIteratedFloorSpot1;

            StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, -1, out int _, out lastIteratedFloorSpot1, 120, showDebug);
            Point lastIteratedFloorSpot2;

            StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, 1, out int _, out lastIteratedFloorSpot2, 120, showDebug);
            ++lastIteratedFloorSpot1.X;
            --lastIteratedFloorSpot2.X;
            if (showDebug)
            {
                Dust.QuickDustLine(lastIteratedFloorSpot1.ToWorldCoordinates(8f, 8f), lastIteratedFloorSpot2.ToWorldCoordinates(8f, 8f), 50f, Color.Pink);
            }
            xLeftEnd  = lastIteratedFloorSpot1;
            xRightEnd = lastIteratedFloorSpot2;
        }
Ejemplo n.º 3
0
        public static void CheckArenaScore(Vector2 arenaCenter, out Point xLeftEnd, out Point xRightEnd, int walkerWidthInTiles = 5, int walkerHeightInTiles = 10)
        {
            bool  flag  = false;
            Point point = arenaCenter.ToTileCoordinates();

            xLeftEnd = (xRightEnd = point);
            Collision.ExpandVertically(point.X, point.Y, out var _, out var bottomY, 0, 4);
            point.Y = bottomY;
            if (flag)
            {
                Dust.QuickDust(point, Color.Blue).scale = 5f;
            }
            SendWalker(point, walkerHeightInTiles, -1, out var _, out var lastIteratedFloorSpot, 120, flag);
            SendWalker(point, walkerHeightInTiles, 1, out var _, out var lastIteratedFloorSpot2, 120, flag);
            lastIteratedFloorSpot.X++;
            lastIteratedFloorSpot2.X--;
            if (flag)
            {
                Dust.QuickDustLine(lastIteratedFloorSpot.ToWorldCoordinates(), lastIteratedFloorSpot2.ToWorldCoordinates(), 50f, Color.Pink);
            }
            xLeftEnd  = lastIteratedFloorSpot;
            xRightEnd = lastIteratedFloorSpot2;
        }
Ejemplo n.º 4
0
 public static void CheckArenaScore(Vector2 arenaCenter, out Point xLeftEnd, out Point xRightEnd, int walkerWidthInTiles = 5, int walkerHeightInTiles = 10)
 {
   bool showDebug = false;
   Point tileCoordinates = arenaCenter.ToTileCoordinates();
   xLeftEnd = xRightEnd = tileCoordinates;
   int topY;
   int bottomY;
   Collision.ExpandVertically((int) tileCoordinates.X, (int) tileCoordinates.Y, out topY, out bottomY, 0, 4);
   tileCoordinates.Y = (__Null) bottomY;
   if (showDebug)
     Dust.QuickDust(tileCoordinates, Color.get_Blue()).scale = 5f;
   int distanceCoveredInTiles1;
   Point lastIteratedFloorSpot1;
   StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, -1, out distanceCoveredInTiles1, out lastIteratedFloorSpot1, 120, showDebug);
   int distanceCoveredInTiles2;
   Point lastIteratedFloorSpot2;
   StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, 1, out distanceCoveredInTiles2, out lastIteratedFloorSpot2, 120, showDebug);
   // ISSUE: explicit reference operation
   // ISSUE: variable of a reference type
   Point& local1 = @lastIteratedFloorSpot1;
   // ISSUE: explicit reference operation
   int num1 = (^local1).X + 1;
   // ISSUE: explicit reference operation
   (^local1).X = (__Null) num1;
   // ISSUE: explicit reference operation
   // ISSUE: variable of a reference type
   Point& local2 = @lastIteratedFloorSpot2;
   // ISSUE: explicit reference operation
   int num2 = (^local2).X - 1;
   // ISSUE: explicit reference operation
   (^local2).X = (__Null) num2;
   if (showDebug)
     Dust.QuickDustLine(lastIteratedFloorSpot1.ToWorldCoordinates(8f, 8f), lastIteratedFloorSpot2.ToWorldCoordinates(8f, 8f), 50f, Color.get_Pink());
   xLeftEnd = lastIteratedFloorSpot1;
   xRightEnd = lastIteratedFloorSpot2;
 }