Beispiel #1
0
 public bool method_18(BoardSquare boardSquare_0, BoardSquare boardSquare_1)
 {
     return(boardSquare_0.X == boardSquare_1.X &&
            (boardSquare_0.Y == boardSquare_1.Y + 1 || boardSquare_0.Y == boardSquare_1.Y - 1) ||
            boardSquare_0.Y == boardSquare_1.Y &&
            (boardSquare_0.X == boardSquare_1.X + 1 || boardSquare_0.X == boardSquare_1.X - 1));
 }
Beispiel #2
0
        public List <BoardSquare> method_21(BoardSquare boardSquare_0, BoardSquare boardSquare_1)
        {
            var boardSquareList = new List <BoardSquare>();

            if (boardSquare_0 == null || boardSquare_1 == null)
            {
                return(boardSquareList);
            }

            var num1 = Mathf.Min(boardSquare_0.X, boardSquare_1.X);
            var num2 = Mathf.Max(boardSquare_0.X, boardSquare_1.X);
            var num3 = Mathf.Min(boardSquare_0.Y, boardSquare_1.Y);
            var num4 = Mathf.Max(boardSquare_0.Y, boardSquare_1.Y);

            for (var int_1 = num3; int_1 <= num4; ++int_1)
            {
                for (var int_0 = num1; int_0 <= num2; ++int_0)
                {
                    var boardSquare = method_10(int_0, int_1);
                    boardSquareList.Add(boardSquare);
                }
            }

            return(boardSquareList);
        }
Beispiel #3
0
 public bool method_19(BoardSquare boardSquare_0, BoardSquare boardSquare_1)
 {
     if (method_17(boardSquare_0, boardSquare_1) && boardSquare_0.X != boardSquare_1.X)
     {
         return(boardSquare_0.Y != boardSquare_1.Y);
     }
     return(false);
 }
Beispiel #4
0
        public BoardSquare method_10(int int_0, int int_1)
        {
            BoardSquare boardSquare = null;

            if (int_0 >= 0 && int_0 < method_3() && (int_1 >= 0 && int_1 < method_4()))
            {
                boardSquare = _boardSquares[int_0, int_1];
            }
            return(boardSquare);
        }
Beispiel #5
0
        public BoardSquare method_9(Transform transform_0)
        {
            BoardSquare boardSquare = null;

            if (transform_0 != null)
            {
                boardSquare = method_5(transform_0.position.X, transform_0.position.Z);
            }
            return(boardSquare);
        }
Beispiel #6
0
        public BoardSquare GetTravelBoardSquare()
        {
            BoardSquare boardSquare = null;

            if (m_gameplayPath != null)
            {
                boardSquare = m_gameplayPath.square;
            }
            return(boardSquare ?? m_actor.method_74());
        }
Beispiel #7
0
        public BoardSquare method_5(float float_0, float float_1)
        {
            BoardSquare boardSquare = null;
            int         index1      = Mathf.RoundToInt(float_0 / squareSize);
            int         index2      = Mathf.RoundToInt(float_1 / squareSize);

            if (index1 >= 0 && index1 < method_3() && (index2 >= 0 && index2 < method_4()))
            {
                boardSquare = _boardSquares[index1, index2];
            }
            return(boardSquare);
        }
Beispiel #8
0
        public bool method_17(BoardSquare boardSquare_0, BoardSquare boardSquare_1)
        {
            var flag1 = boardSquare_0.X != boardSquare_1.X || boardSquare_0.Y != boardSquare_1.Y;
            var flag2 = boardSquare_0.X >= boardSquare_1.X - 1 && boardSquare_0.X <= boardSquare_1.X + 1;
            var flag3 = boardSquare_0.Y >= boardSquare_1.Y - 1 && boardSquare_0.Y <= boardSquare_1.Y + 1;

            if (flag1 && flag2)
            {
                return(flag3);
            }
            return(false);
        }
 public ClientGameModeEvent(
     GameModeEventType eventType,
     byte objectGuid,
     BoardSquare square,
     ActorData primaryActor,
     ActorData secondaryActor,
     int eventGuid)
 {
     m_eventType      = eventType;
     m_objectGuid     = objectGuid;
     m_square         = square;
     m_primaryActor   = primaryActor;
     m_secondaryActor = secondaryActor;
     m_eventGuid      = eventGuid;
 }
Beispiel #10
0
 public void ResetValuesToDefault()
 {
     square                    = null;
     moveCost                  = 0.0f;
     heuristicCost             = 0.0f;
     prev                      = null;
     next                      = null;
     m_unskippable             = false;
     m_reverse                 = false;
     m_visibleToEnemies        = false;
     m_updateLastKnownPos      = false;
     m_moverDiesHere           = false;
     m_moverHasGameplayHitHere = false;
     m_moverClashesHere        = false;
     m_moverBumpedFromClash    = false;
     m_expectedBackupNum       = 0;
 }