예제 #1
0
 /// <summary>
 /// Returns true if <paramref name="row"/>, <paramref name="col"/>, <paramref name="elev"/> (matrix space) is in the same spot
 /// as <paramref name="b"/>.
 /// </summary>
 /// <param name="row">The row.</param>
 /// <param name="col">The col.</param>
 /// <param name="elev">The elev.</param>
 /// <param name="b">The b.</param>
 /// <param name="mb">The mb.</param>
 /// <param name="ignoreHeight">if set to <c>true</c> [ignore height].</param>
 /// <returns></returns>
 public static bool SameSpot(int row, int col, int elev, OmniBehaviour b, MatrixConstraints mb = MatrixConstraints.ALL, bool ignoreHeight = false)
 {
     return(mb != MatrixConstraints.NONE && (((mb & MatrixConstraints.ROW) == MatrixConstraints.ROW) ? row == b.ROWINDEX : true) && (((mb & MatrixConstraints.COL) == MatrixConstraints.COL) ? col == b.COLINDEX : true) && (((mb & MatrixConstraints.HEIGHT) == MatrixConstraints.HEIGHT) ? (elev == b.HEIINDEX || ignoreHeight) : true));
 }
예제 #2
0
 public static bool Close(OmniBehaviour a, OmniBehaviour b, int distance = 1, bool ignoreHeight = false)
 {
     return((distance * a.IndexScale) < UnityEngine.Mathf.Abs((a.POSINDEX - b.POSINDEX).magnitude) && (ignoreHeight || a.HEIINDEX == b.HEIINDEX));
 }
예제 #3
0
 public static bool SameSpot(OmniBehaviour a, OmniBehaviour b, MatrixConstraints mb = MatrixConstraints.ALL, bool ignoreHeight = false)
 {
     return(mb != MatrixConstraints.NONE && (((mb & MatrixConstraints.ROW) == MatrixConstraints.ROW) ? a.ROWINDEX == b.ROWINDEX : true) && (((mb & MatrixConstraints.COL) == MatrixConstraints.COL) ? a.COLINDEX == b.COLINDEX : true) && (((mb & MatrixConstraints.HEIGHT) == MatrixConstraints.HEIGHT) ? (a.HEIINDEX == b.HEIINDEX || ignoreHeight) : true));
 }