コード例 #1
0
        public static List <GridPos> TransformOccupiedPositions(GridPosR localGridPos, List <GridPos> ori_OccupiedPositions)
        {
            List <GridPos> resGP = new List <GridPos>();

            foreach (GridPos oriGP in ori_OccupiedPositions)
            {
                GridPos temp_rot = GridPos.RotateGridPos(oriGP, localGridPos.orientation);
                GridPos final    = temp_rot + (GridPos)localGridPos;
                resGP.Add(final);
            }

            return(resGP);
        }
コード例 #2
0
 public bool Equals(GridPosR gp)
 {
     return(gp.x == x && gp.z == z && gp.orientation == orientation);
 }
コード例 #3
0
 public bool Equals(GridPosR r)
 {
     return(r.x == x && r.z == z);
 }