コード例 #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;
        }
コード例 #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 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
            __Null& local1 = @lastIteratedFloorSpot1.X;
            // ISSUE: cast to a reference type
            // ISSUE: explicit reference operation
            int num1 = ^ (int&)local1 + 1;
コード例 #3
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;
        }
コード例 #4
0
ファイル: StrayMethods.cs プロジェクト: PhelixSky/TeDW
        public static void CheckArenaScore(Vector2 arenaCenter, out Point xLeftEnd, out Point xRightEnd, int walkerWidthInTiles = 5, int walkerHeightInTiles = 10)
        {
            Point tileCoordinates = arenaCenter.ToTileCoordinates();

            xLeftEnd = xRightEnd = tileCoordinates;
            int topY;
            int bottomY;

            Collision.ExpandVertically(tileCoordinates.X, tileCoordinates.Y, out topY, out bottomY, 0, 4);
            tileCoordinates.Y = bottomY;
            int   distanceCoveredInTiles1;
            Point lastIteratedFloorSpot1;

            StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, -1, out distanceCoveredInTiles1, out lastIteratedFloorSpot1, 120, false);
            int   distanceCoveredInTiles2;
            Point lastIteratedFloorSpot2;

            StrayMethods.SendWalker(tileCoordinates, walkerHeightInTiles, 1, out distanceCoveredInTiles2, out lastIteratedFloorSpot2, 120, false);
            ++lastIteratedFloorSpot1.X;
            --lastIteratedFloorSpot2.X;
            xLeftEnd  = lastIteratedFloorSpot1;
            xRightEnd = lastIteratedFloorSpot2;
        }
コード例 #5
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;
 }